Catching upload errors
I am using jQuery with unsigned_cloudinary_upload.
On my upload preset (on the server) I only allow certain image formats.
When I upload a txt file for example, I get an AJAX 400 error.
Is there a way to catch this event? The same I say trap the cloudinarydone event on the upload form? The fileuploadfail event does not fire. There isn't any documentation that details all possible events I can catch ... I've tried cloudinaryerror, fileuploaderror etc ...
-
Official comment
Hi Jorg,
In order to catch the error, you can catch `cloudinaryfail`. For example:
$(function() {$(function() {
$('.upload_field').unsigned_cloudinary_upload("UPLOAD_PRESET",{cloud_name:'<CLOUD_NAME>'})
.on("cloudinaryfail", function(e,data){
console.log("error! ", data.jqXHR.responseText);
});
});Comment actions
Post is closed for comments.
Comments
1 comment