Skip to content

ElNinjaGaiden/org.apache.cordova.cloudinary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova Cloudinary plugin

Integrates some of the Cloudinary features into Cordova

Installation

With cordova-cli

If you are using cordova-cli, install with:

cordova plugin add https://github.com/ElNinjaGaiden/org.apache.cordova.cloudinary -save

##Uploading images

var request     = {
    imagePath           : '<imagePath>',
    tags                : 'tag1, tag2, tag3', //Optional
    measures            : { height: <yourDesiredHeight>, width: <yourDesiredWidth> }, //Optional
    cloudinarySettings  : {
        cloudName   : '<CloudinaryCloudName>',
        apiKey      : '<CloudinaryApiKey>',
        apiSecret   : '<CloudinaryApiSecret>'
    }
}

navigator.cloudinary.uploadImage(request, function (uploadResponse) {
    //Success callback
    console.log('Cloudinary image plublic id', uploadResponse.public_id);
    console.log('Cloudinary image format', uploadResponse.format);
}, function (uploadError) {
    //Error callback
    console.error('Error', error);
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published