diff --git a/bower.json b/bower.json index 71c302343..9c4fd3c94 100644 --- a/bower.json +++ b/bower.json @@ -25,6 +25,6 @@ "font-awesome-bower": "4.3.0", "js-data": "~2.3.0", "js-data-angular": "~3.0.0", - "ng-file-upload": "~7.0.17" + "ng-file-upload": "~9.1.2" } } diff --git a/openslides/mediafiles/serializers.py b/openslides/mediafiles/serializers.py index 01946cd93..58b2de0ba 100644 --- a/openslides/mediafiles/serializers.py +++ b/openslides/mediafiles/serializers.py @@ -44,7 +44,6 @@ class MediafileSerializer(ModelSerializer): 'mediafile', 'uploader', 'filesize', - 'filetype', 'timestamp',) def get_filesize(self, mediafile): diff --git a/openslides/mediafiles/static/js/mediafiles/site.js b/openslides/mediafiles/static/js/mediafiles/site.js index 97ba38319..63bd4042f 100644 --- a/openslides/mediafiles/static/js/mediafiles/site.js +++ b/openslides/mediafiles/static/js/mediafiles/site.js @@ -96,9 +96,7 @@ function uploadFile($timeout, $scope, $state, Upload, mediafile) { file.upload = Upload.upload({ url: '/rest/mediafiles/mediafile/' + (mediafile ? mediafile.id : ''), method: mediafile ? 'PUT' : 'POST', - fields: {title: file.title}, - file: file.mediafile, - fileFormDataName: 'mediafile' + data: {mediafile: file.newFile, title: file.title} }); file.upload.then(function (response) { diff --git a/openslides/mediafiles/static/templates/mediafiles/mediafile-form.html b/openslides/mediafiles/static/templates/mediafiles/mediafile-form.html index 1a3924280..16a785f14 100644 --- a/openslides/mediafiles/static/templates/mediafiles/mediafile-form.html +++ b/openslides/mediafiles/static/templates/mediafiles/mediafile-form.html @@ -14,7 +14,7 @@