Merge branch 'typescript' of fornaxian.com:Pixeldrain/pixeldrain-web into typescript

This commit is contained in:
Wim Brand
2018-01-30 10:30:04 +01:00
3 changed files with 7 additions and 3 deletions

View File

@@ -160,13 +160,15 @@ var UploadWorker = /** @class */ (function () {
formData.append("name", file.name); formData.append("name", file.name);
var that = this; // jquery changes the definiton of "this" var that = this; // jquery changes the definiton of "this"
$.ajax({ $.ajax({
type: 'POST',
url: "/api/file", url: "/api/file",
data: formData, data: formData,
timeout: 7200000,
cache: false, cache: false,
async: true,
crossDomain: false, crossDomain: false,
contentType: false, contentType: false,
processData: false, processData: false,
type: 'POST',
xhr: function () { xhr: function () {
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.upload.addEventListener("progress", function (evt) { xhr.upload.addEventListener("progress", function (evt) {

View File

@@ -223,7 +223,7 @@ a:hover{
margin: 6px; margin: 6px;
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
box-shadow: 2px 2px 5px 2px #111; box-shadow: 0px 0px 5px 2px #111;
background-color: #111; background-color: #111;
color: var(--text_color); color: var(--text_color);
word-break: break-all; word-break: break-all;

View File

@@ -72,13 +72,15 @@ class UploadWorker {
var that = this // jquery changes the definiton of "this" var that = this // jquery changes the definiton of "this"
$.ajax({ $.ajax({
type: 'POST',
url: "/api/file", url: "/api/file",
data: formData, data: formData,
timeout: 7200000, // 2 hours
cache: false, cache: false,
async: true,
crossDomain: false, crossDomain: false,
contentType: false, contentType: false,
processData: false, processData: false,
type: 'POST',
xhr: function () { xhr: function () {
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.upload.addEventListener("progress", function (evt) { xhr.upload.addEventListener("progress", function (evt) {