I am trying to replace an image on cloudinary using it's public_id. So, i made the signature using timestamp, public_id & overwrite. I had set up the overwrite value to 'true'. Below i have attached a screenshot of the parameter being passed. The image is successfully uploaded but with a different version tag but the original image is not replaced.
Curious thing is that the changed image successfully replaces the original image on first upload but does not work on any further uploads on that image. So, the uploads are successful but are uploaded with a different version tag.
http://cloudinary.com/documentation/upload_images#renaming_images I have used the overwrite option given in the above link to replace the original image.
I waited for quite a while (at least half an hour) thinking that changes might take time to reflect but it remained the same.
Any insight into what maybe wrong here ?
var newForm = new FormData();
newForm.append('timestamp',ts);
newForm.append('api_key', $rootScope.CLOUDINARY_CONFIG.api_key);
newForm.append('signature', signature);
newForm.append('public_id', scope.model.public_id);
newForm.append('overwrite', true);
newForm.append('file', canvasImage);
$http.post($rootScope.CLOUDINARY_CONFIG.upload_url, newForm, {
transformRequest: angular.identity,
file : canvasImage,
headers: {'X-Requested-With': 'XMLHttpRequest','Content-Type': undefined}
})
.success(function(data){
// success
})
.error(function(err){
// log error
console.log('fail');
});
[javascript]
? Or better yet: Why is there no code in a[javascript]
tagged question? – Cerbrus