Fixes upload indicator

Fixes max-body size
This commit is contained in:
Andrew 2021-08-23 17:40:14 -04:00
parent 16c017716f
commit 3fbf4e6252
2 changed files with 17 additions and 18 deletions

View File

@ -14,7 +14,7 @@ import time
logger = logging.getLogger(__name__)
# Class&Function Defination
MAX_STREAMED_SIZE = 32000
MAX_STREAMED_SIZE = 1024 * 1024 * 1024
@tornado.web.stream_request_body
class UploadHandler(tornado.web.RequestHandler):

View File

@ -583,18 +583,17 @@
label: "Upload",
className: "btn-default",
callback: async function () {
var height = files.files.length*50;
var waitMessage = '<p class="text-center mb-0">'+
'<i class="fa fa-spin fa-cog"></i>'+
'Please wait while we upload your files... This may take a while.<br>'+
'<strong>DO NOT CLOSE THIS PAGE.</strong>'+
'</p>'+
'<div class="progress" id="upload-progress-bar-parent" style="height:'+height +'px; width:100%; display: block;">'+
'</div>'
files = document.getElementById("files");
uploadWaitDialog = bootbox.dialog({
message: waitMessage,
message: `
<p class="text-center mb-0">
<i class="fa fa-spin fa-cog"></i>
Please wait while we upload your files... This may take a while.<br>
<strong>DO NOT CLOSE THIS PAGE.</strong>
</p>
<div class="progress" id="upload-progress-bar-parent">
</div>
`,
closeButton: false
});
let nFiles = files.files.length;
@ -604,20 +603,20 @@
hideUploadBox();
break;
}
console.log(files.files[i].name);
console.log(files.files[i]);
const progressHtml = `
<div style="width: 100%; min-width: 100%;">
${files.files[i].name}:
<br><div
<div>
${path + '/' + files.files[i]}:
<div
id="upload-progress-bar-${i + 1}"
class="progress-bar progress-bar-striped progress-bar-animated"
role="progressbar"
style="width: 100%; height: 10px;"
style="width: 0%"
aria-valuenow="0"
aria-valuemin="0"
aria-valuemax="100"
></div>
</div><br>
</div>
`;
$('#upload-progress-bar-parent').append(progressHtml);
sendFile(files.files[i], path, server_id, (progress) => {
@ -754,7 +753,7 @@
if (webSocket) {
webSocket.on('close_upload_box', function (close_upload_box) {
//hideUploadBox();
hideUploadBox();
});
}