From acc835948e83d26549d1fbba76db0c6012cc4875 Mon Sep 17 00:00:00 2001 From: Andriy Oblivantsev Date: Wed, 13 Dec 2017 22:05:16 +0100 Subject: [PATCH] Fix handle upload file error info messages --- src/js/jquery.form.generator.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/jquery.form.generator.js b/src/js/jquery.form.generator.js index 56dc570..a4c43d1 100644 --- a/src/js/jquery.form.generator.js +++ b/src/js/jquery.form.generator.js @@ -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('