Skip to content

Commit 97c6617

Browse files
committed
Show form validation errors from Django.
1 parent d5523a6 commit 97c6617

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fileupload/static/js/jquery.fileupload.js

+3
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,9 @@
805805
response.jqXHR = options.jqXHR = jqXHR;
806806
response.textStatus = options.textStatus = textStatus;
807807
response.errorThrown = options.errorThrown = errorThrown;
808+
if ('file' in response.jqXHR.responseJSON) {
809+
response.errorThrown = options.errorThrown = response.jqXHR.responseJSON.file.join(", ");
810+
}
808811
this._trigger('fail', null, options);
809812
},
810813

0 commit comments

Comments
 (0)