From 6b3433ab116836dc92d1c720f716688e294e03ad Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Thu, 25 Jan 2018 20:37:56 +0100 Subject: [PATCH 1/3] Fix file button shadow --- res/static/res/style/layout.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/static/res/style/layout.css b/res/static/res/style/layout.css index 4449ae9..5de825a 100644 --- a/res/static/res/style/layout.css +++ b/res/static/res/style/layout.css @@ -223,7 +223,7 @@ a:hover{ margin: 6px; padding: 0; overflow: hidden; - box-shadow: 2px 2px 5px 2px #111; + box-shadow: 0px 0px 5px 2px #111; background-color: #111; color: var(--text_color); word-break: break-all; From 552c8a67ba5b8a554241048dc0c8dcadd2a78aa5 Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Mon, 29 Jan 2018 22:00:13 +0100 Subject: [PATCH 2/3] Async uploads should help catching timeout errors --- res/static/res/script/compiled/home.js | 4 +++- res/static/res/typescript/lib/uploader.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/res/static/res/script/compiled/home.js b/res/static/res/script/compiled/home.js index 7aff8f3..b4c56fa 100644 --- a/res/static/res/script/compiled/home.js +++ b/res/static/res/script/compiled/home.js @@ -160,13 +160,15 @@ var UploadWorker = /** @class */ (function () { formData.append("name", file.name); var that = this; // jquery changes the definiton of "this" $.ajax({ + type: 'POST', url: "/api/file", data: formData, + timeout: 300000, cache: false, + async: true, crossDomain: false, contentType: false, processData: false, - type: 'POST', xhr: function () { var xhr = new XMLHttpRequest(); xhr.upload.addEventListener("progress", function (evt) { diff --git a/res/static/res/typescript/lib/uploader.ts b/res/static/res/typescript/lib/uploader.ts index 7403117..34a4c77 100644 --- a/res/static/res/typescript/lib/uploader.ts +++ b/res/static/res/typescript/lib/uploader.ts @@ -72,13 +72,15 @@ class UploadWorker { var that = this // jquery changes the definiton of "this" $.ajax({ + type: 'POST', url: "/api/file", data: formData, + timeout: 300000, // 5 minutes cache: false, + async: true, crossDomain: false, contentType: false, processData: false, - type: 'POST', xhr: function () { var xhr = new XMLHttpRequest(); xhr.upload.addEventListener("progress", function (evt) { From 5067d67477c1aa163642a663b80bf05755f5e3a2 Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Mon, 29 Jan 2018 22:14:48 +0100 Subject: [PATCH 3/3] the timeout screwed up large uploads --- res/static/res/script/compiled/home.js | 2 +- res/static/res/typescript/lib/uploader.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/res/static/res/script/compiled/home.js b/res/static/res/script/compiled/home.js index b4c56fa..38f959d 100644 --- a/res/static/res/script/compiled/home.js +++ b/res/static/res/script/compiled/home.js @@ -163,7 +163,7 @@ var UploadWorker = /** @class */ (function () { type: 'POST', url: "/api/file", data: formData, - timeout: 300000, + timeout: 7200000, cache: false, async: true, crossDomain: false, diff --git a/res/static/res/typescript/lib/uploader.ts b/res/static/res/typescript/lib/uploader.ts index 34a4c77..611bade 100644 --- a/res/static/res/typescript/lib/uploader.ts +++ b/res/static/res/typescript/lib/uploader.ts @@ -75,7 +75,7 @@ class UploadWorker { type: 'POST', url: "/api/file", data: formData, - timeout: 300000, // 5 minutes + timeout: 7200000, // 2 hours cache: false, async: true, crossDomain: false,