Cloudinary - Upload preset must be in whitelist for unsigned uploads

I want to upload image, to Cloudinary, taken directly from camera in Ionic using cordova camera plugin. I am getting an error of code 1, having message "upload preset must be in whitelist for unsigned uploads." How to solve this 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
    });
}

Answers


First, you need to enable unsigned uploading for your Cloudinary account from the Upload Settings page.

Please refer the blog post on direct uploads from the browser and check. It can happen if some data necessary for the POST request is missing.


Need Your Help

How to disable unwanted device log in ddms logcat

android android-logcat

My problem is that : when i connect my Android device to eclipse then in ddms unwanted device log is print continuously so that after some time my application log is disappear from the log cat .

Windows Phone 8: How to play an audio file using MediaElement class ?

windows-phone-8 mediaelement

I am using MediaElement class and trying to play an audio file (.mp3) which I have added in the solution explorer (see the image below).