ionic framework - Cloudinary - Upload preset must be in whitelist for unsigned uploads -


i want upload image, cloudinary, taken directly camera in ionic using cordova camera plugin. getting error of code 1, having message "upload preset must in whitelist unsigned uploads." how solve error.please help.

my edited js code is:

    $scope.cameraopen = function(){    var options = {          quality : 100,          destinationtype : camera.destinationtype.file_uri,//file_uri          sourcetype : camera.picturesourcetype.camera,          allowedit : false,          encodingtype: camera.encodingtype.jpeg,          popoveroptions: camerapopoveroptions,          targetwidth: 500,          targetheight: 500,          savetophotoalbum: true      }; $cordovacamera.getpicture(options).then(function(imagedata) {  var uploadoptions = {               upload_preset: cloudinary.config().upload_preset,               tags: 'mytag',               context: 'photo=photo',                file: imagedata             };         var onuploadsuccess = function(data){         console.log("success"+json.stringify(data));        }        var onuploadfail = function(e){         console.log("error"+json.stringify(e));        }         var ft = new filetransfer();  ft.upload(imagedata, "http://api.cloudinary.com/v1_1/" + cloudinary.config().cloud_name + "/upload", onuploadsuccess, onuploadfail, uploadoptions, true);      }, function(err) {       // error     }); } 


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -