summaryrefslogtreecommitdiff
path: root/assets/js/components
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2018-01-29 15:56:30 -0800
committerFrédéric Guillot <fred@kanboard.net>2018-01-29 15:56:30 -0800
commit9ddefa979a12aff2334d6e7048e142cfdef5bb89 (patch)
tree30416f103ba88c7bdf1039c9d40085a7a784ddc0 /assets/js/components
parent90984d6bb9b3bd508e0ca7f8c0ee07d304679fb5 (diff)
Add CSRF check for task and project files upload
Diffstat (limited to 'assets/js/components')
-rw-r--r--assets/js/components/file-upload.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/js/components/file-upload.js b/assets/js/components/file-upload.js
index 3786077d..415fa2c5 100644
--- a/assets/js/components/file-upload.js
+++ b/assets/js/components/file-upload.js
@@ -29,7 +29,7 @@ KB.component('file-upload', function (containerElement, options) {
currentFileIndex++;
if (currentFileIndex < files.length) {
- KB.http.uploadFile(options.url, files[currentFileIndex], onProgress, onComplete, onError, onServerError);
+ KB.http.uploadFile(options.url, files[currentFileIndex], options.csrf, onProgress, onComplete, onError, onServerError);
} else {
KB.trigger('modal.stop');
KB.trigger('modal.hide');
@@ -92,7 +92,7 @@ KB.component('file-upload', function (containerElement, options) {
function uploadFiles() {
if (files.length > 0) {
- KB.http.uploadFile(options.url, files[currentFileIndex], onProgress, onComplete, onError, onServerError);
+ KB.http.uploadFile(options.url, files[currentFileIndex], options.csrf, onProgress, onComplete, onError, onServerError);
}
}