Async uploads should help catching timeout errors

This commit is contained in:
2018-01-29 22:00:13 +01:00
parent 6b3433ab11
commit 552c8a67ba
2 changed files with 6 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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) {