Skip to content

Commit

Permalink
Fix handle upload file error info messages
Browse files Browse the repository at this point in the history
  • Loading branch information
eSlider committed Dec 13, 2017
1 parent 9552fbb commit acc8359
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/js/jquery.form.generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,11 @@
var fileInfo = result.files[0];
var img = container.closest('form').find('img[name="' + item.name + '"]');

if(fileInfo.error) {
$.notify(fileInfo.error, "error");
return;
}

if(fileInfo.name) {
buttonContainer.find('.upload-button-text').html('<i class="fa fa-check-circle-o" aria-hidden="true"/> ' + truncate(fileInfo.name, 10));
var newUploadFileInput = container.find('input[type="file"]')
Expand Down

0 comments on commit acc8359

Please sign in to comment.