Explorar el Código

Merge branch 'master' into develop

version-14
Nabin Hait hace 7 años
padre
commit
da5bdcf513
Se han modificado 2 ficheros con 13 adiciones y 2 borrados
  1. +1
    -1
      frappe/__init__.py
  2. +12
    -1
      frappe/public/js/frappe/socketio_client.js

+ 1
- 1
frappe/__init__.py Ver fichero

@@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
from .exceptions import * from .exceptions import *
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template 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" __title__ = "Frappe Framework"


local = Local() local = Local()


+ 12
- 1
frappe/public/js/frappe/socketio_client.js Ver fichero

@@ -291,6 +291,7 @@ frappe.socketio.SocketIOUploader = class SocketIOUploader {
} }


this.reader.readAsArrayBuffer(slice); this.reader.readAsArrayBuffer(slice);
this.started = true;
this.keep_alive(); this.keep_alive();
}); });


@@ -338,6 +339,8 @@ frappe.socketio.SocketIOUploader = class SocketIOUploader {
this.chunk_size = chunk_size; this.chunk_size = chunk_size;
this.callback = callback; this.callback = callback;
this.on_progress = on_progress; this.on_progress = on_progress;
this.fallback = fallback;
this.started = false;


this.reader.onload = () => { this.reader.onload = () => {
frappe.socketio.socket.emit('upload-accept-slice', { frappe.socketio.socket.emit('upload-accept-slice', {
@@ -359,8 +362,16 @@ frappe.socketio.SocketIOUploader = class SocketIOUploader {
clearTimeout (this.next_check); clearTimeout (this.next_check);
} }
this.next_check = setTimeout (() => { this.next_check = setTimeout (() => {
if (!this.started) {
// upload never started, so try fallback
if (this.fallback) {
this.fallback();
} else {
this.disconnect();
}
}
this.disconnect(); this.disconnect();
}, 5000);
}, 3000);
} }


disconnect(with_message = true) { disconnect(with_message = true) {


Cargando…
Cancelar
Guardar