diff options
Diffstat (limited to 'assets/js/core')
-rw-r--r-- | assets/js/core/http.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/js/core/http.js b/assets/js/core/http.js index ad321cf1..3e02a4d7 100644 --- a/assets/js/core/http.js +++ b/assets/js/core/http.js @@ -83,9 +83,10 @@ KB.http.postForm = function (url, formElement) { return (new KB.http.request('POST', url, {}, formData)).execute(); }; -KB.http.uploadFile = function (url, file, onProgress, onComplete, onError, onServerError) { +KB.http.uploadFile = function (url, file, csrf, onProgress, onComplete, onError, onServerError) { var fd = new FormData(); fd.append('files[]', file); + fd.append('csrf_token', csrf); var xhr = new XMLHttpRequest(); xhr.upload.addEventListener('progress', onProgress); |