flask-file-server
flask-file-server copied to clipboard
Uploading any file gives "Error: undefined" in the upload window
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
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(){},
},