Merge branch 'master' into develop
This commit is contained in:
commit
da5bdcf513
2 changed files with 13 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
|
|||
from .exceptions import *
|
||||
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template
|
||||
|
||||
__version__ = '9.0.3'
|
||||
__version__ = '9.0.4'
|
||||
__title__ = "Frappe Framework"
|
||||
|
||||
local = Local()
|
||||
|
|
|
|||
|
|
@ -291,6 +291,7 @@ frappe.socketio.SocketIOUploader = class SocketIOUploader {
|
|||
}
|
||||
|
||||
this.reader.readAsArrayBuffer(slice);
|
||||
this.started = true;
|
||||
this.keep_alive();
|
||||
});
|
||||
|
||||
|
|
@ -338,6 +339,8 @@ frappe.socketio.SocketIOUploader = class SocketIOUploader {
|
|||
this.chunk_size = chunk_size;
|
||||
this.callback = callback;
|
||||
this.on_progress = on_progress;
|
||||
this.fallback = fallback;
|
||||
this.started = false;
|
||||
|
||||
this.reader.onload = () => {
|
||||
frappe.socketio.socket.emit('upload-accept-slice', {
|
||||
|
|
@ -359,8 +362,16 @@ frappe.socketio.SocketIOUploader = class SocketIOUploader {
|
|||
clearTimeout (this.next_check);
|
||||
}
|
||||
this.next_check = setTimeout (() => {
|
||||
if (!this.started) {
|
||||
// upload never started, so try fallback
|
||||
if (this.fallback) {
|
||||
this.fallback();
|
||||
} else {
|
||||
this.disconnect();
|
||||
}
|
||||
}
|
||||
this.disconnect();
|
||||
}, 5000);
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
disconnect(with_message = true) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue