Open michaelbaudino opened 10 years ago
Workaround is to fileuploadfail instead of s3_upload_failed
$('form#fileupload').bind('fileuploadfail', function(e, data) { setTimeout(function() { alert($(data.jqXHR.responseXML).find("Message").text()) }, 0);
+1 for passing the response object with the callbacks.
Hi,
When setting
max_file_size
(e.g.1.megabytes
) ins3_uploader_form
arguments, and trying to upload a file bigger than what's allowed (e.g. a 3 megabytes file), thes3_upload_failed
event is correctly fired (as stated in the doc) but the progress bar does not disappear. Is this an expected behaviour ? And we have no way to find this progressbar (in order to hide it manually) since the fired eventtarget
is the whole form.Furthermore, in that case, the XHR answer contains some XML, e.g.:
... but the only information we have access to from the event handler is the
Bad Request
string in theerror_thrown
field of thecontent
object (is it from the HTTP response code ?). It would be great to have access to more specific error message as specified in the answer's XML.Thanks in advance.
PS: if you want 2 separate issues, please let me know, I'll be glad to split it up.