Commit e689cb02 authored by Nabin Hait's avatar Nabin Hait
Browse files

Merge branch 'hotfix'

parents 3280f6f3 1dfce980
No related merge requests found
Showing with 13 additions and 2 deletions
+13 -2
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment