Skip to content

lama-media/skipper-cloudinary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skipper Cloudinary - forked by Lama Media

This adapter is made to work with skipper.

The conventional test suite for skipper adapter can't be used for this adapter because cloudinary only support images and videos. Thus there are no tests for the moment.

Any PR, advice is welcomed :-)

How to use

req.file('awesomefile')
    .upload({
      adapter  : require('skipper-cloudinary'),
      key      : 'cloudinaryApiKey',
      secret   : 'cloudinarySecretKey',
      cloudName: 'cloudinaryCloudName',
      uploadOptions: {
        folder: 'awesomefolder',
        resource_type: 'video'
      }
    }, (error, uploadedFiles) => {
      uploadedFiles.forEach(uploadedFile => {
        console.log(uploadedFile); // contains regular meta
        console.log(uploadedFile.extra); // contains cloudinary response
      });
    })
    .on('progress', function( args ){
        console.log('percent loaded:', args.percent)
    });

Options

Option Type Description
key ((string)) Api key of cloudinary
secret ((string)) Api secret of cloudinary
cloudName ((string)) Name of your cloudinary cloud
uploadOptions ((object)) Options directly given to the cloudinary uploader. See the Cloudinary documentation for all options.

About

Skipper adapter for cloudinary

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%