New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cloudinary-promised

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudinary-promised - npm Package Compare versions

Comparing version

to
1.0.8

15

dist/index.js

@@ -12,3 +12,2 @@ "use strict";

const cloudinary = require('cloudinary');
const util_1 = require("util");
const url_exists_promise_1 = require("url-exists-promise");

@@ -33,6 +32,12 @@ const videoExtensions = ['mp4'];

};
const uploadPromised = util_1.promisify(cloudinary.v2.uploader.upload);
exports.uploadFile = (id, localAbsolutePath, options) => uploadPromised(localAbsolutePath, Object.assign({ public_id: id, resource_type: exports.isVideo(localAbsolutePath) ? 'video' : 'image' }, options));
const uploadExplicitPromised = util_1.promisify(cloudinary.v2.uploader.explicit);
exports.getMetadata = (id, localAbsolutePath, options) => uploadExplicitPromised(id, Object.assign({ image_metadata: true, type: 'upload', resource_type: exports.isVideo(localAbsolutePath) ? 'video' : 'image' }, options));
exports.uploadFile = (id, localAbsolutePath, options) => new Promise((resolve, reject) => cloudinary.v2.uploader.upload(localAbsolutePath, Object.assign({ public_id: id, resource_type: exports.isVideo(localAbsolutePath) ? 'video' : 'image' }, options), (error, result) => {
if (error)
return reject(error);
resolve(result);
}));
exports.getMetadata = (id, localAbsolutePath, options) => new Promise((resolve, reject) => cloudinary.v2.uploader.explicit(id, Object.assign({ image_metadata: true, type: 'upload', resource_type: exports.isVideo(localAbsolutePath) ? 'video' : 'image' }, options), (error, result) => {
if (error)
return reject(error);
resolve(result);
}));
exports.imageExists = (id, options) => {

@@ -39,0 +44,0 @@ const urlImg = `http://res.cloudinary.com/${options.cloud_name}/image/upload/${id}`;

{
"name": "cloudinary-promised",
"version": "1.0.7",
"version": "1.0.8",
"description": "Wrapper for Cloudinary functions.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet