From: Christian Weiske Date: Fri, 7 Mar 2014 09:28:20 +0000 (+0100) Subject: (no commit message) X-Git-Url: https://git.cweiske.de/paste/87.git/commitdiff_plain --- a6aa752ecac53f9203fb10b27935fa1b430ffe3a diff --git a/typo3-draguploder.js b/typo3-draguploder.js new file mode 100644 index 0000000..6efaa92 --- /dev/null +++ b/typo3-draguploder.js @@ -0,0 +1,19 @@ + var s = $.extend(true, {}, $.ajaxSettings, { + url: TYPO3.settings.DragUploader.ajaxUrl, + contentType: false, + processData: false, + data: formData, + cache: false, + type: 'POST', + success: me.uploadComplete, + error: me.uploadError + }); + + s.xhr = function() { + var xhr = $.ajaxSettings.xhr(); + xhr.upload.addEventListener('progress', me.updateProgress); + return xhr; + }; + + // start upload + me.upload = $.ajax(s); \ No newline at end of file