flask-file-server icon indicating copy to clipboard operation
flask-file-server copied to clipboard

Uploading any file gives "Error: undefined" in the upload window

Open MonolithInd opened this issue 6 years ago • 1 comments

Using Python3 and this code, everything works fine. Starts ok, no errors but whenever I use it to upload a file I click "add file", Select a file and the progress bar goes to 100% then immediately under it it says "Error: Undefined" and sits there. If I click on "Close" I'm taken back to the file view and the uploaded file doesn't show until I click "Reload" in my browser.

Browser: Latest Chrome. OS: Tested on windows and Linux 18.04 Python: Python 3.6.5

Screenshot attached

screenshot from 2018-05-03 11-15-31

MonolithInd avatar May 03 '18 03:05 MonolithInd

update the custom.js file like below,it will fixed the undefined upload error: uploadFile: { url: "#", data: {}, type: 'POST', enctype: 'multipart/form-data', beforeSend: function(){}, success: function(data, el){ var parent = el.find(".jFiler-jProgressBar").parent(); el.find(".jFiler-jProgressBar").fadeOut("slow", function(){ $("<div class="jFiler-item-others text-success"><i class="icon-jfi-check-circle"> Success").hide().appendTo(parent).fadeIn("slow");
}); }, error: function(el){ var parent = el.find(".jFiler-jProgressBar").parent(); el.find(".jFiler-jProgressBar").fadeOut("slow", function(){ $("<div class="jFiler-item-others text-error"><i class="icon-jfi-minus-circle"> Error").hide().appendTo(parent).fadeIn("slow");
}); }, statusCode: {}, onProgress: function(){}, },

miaohf avatar Jan 02 '19 11:01 miaohf