From 575d4c50622dca8de9934e4ff6591409ab622a81 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 7 Jan 2015 16:50:08 -0500 Subject: [PATCH] Fix file uploading --- static/js/core-config-setup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/core-config-setup.js b/static/js/core-config-setup.js index d0d2bd8e6..a57e74b37 100644 --- a/static/js/core-config-setup.js +++ b/static/js/core-config-setup.js @@ -442,9 +442,9 @@ angular.module("core-config-setup", ['angularFileUpload']) $scope.uploadProgress = 0; $scope.upload = $upload.upload({ - url: '/api/v1/superuser/config/file', + url: '/api/v1/superuser/config/file/' + $scope.filename, method: 'POST', - data: { filename: $scope.filename }, + data: {'_csrf_token': window.__token}, file: files[0], }).progress(function(evt) { $scope.uploadProgress = parseInt(100.0 * evt.loaded / evt.total);