Skip to content
Browse files

Merge pull request #159 from markotibold/revert-fine-uploader-changes

Revert unnecessary changes to Fine Uploader. The csrf-token can be passe...
  • Loading branch information...
2 parents 61c54f6 + 28a9d35 commit 1e3d7d9ff46da2ffe49e5b85f4b97b67fbd552c0 @dbunskoek dbunskoek committed Feb 19, 2013
View
11 fiber/static/fiber/js/admin.js
@@ -675,15 +675,10 @@ var BaseFileSelectDialog = AdminRESTDialog.extend({
endpoint: this.get_upload_path(),
inputName: this.get_upload_fieldname(),
params: {
- 'title': this.get_upload_fieldname()
- },
- paramsInBody: true,
- customHeaders: {
- "X-CSRFToken": getCookie('csrftoken')
- },
- customFields: {
+ 'title': this.get_upload_fieldname(),
"csrfmiddlewaretoken": getCookie('csrftoken')
- }
+ },
+ paramsInBody: true
}
});
View
12 fiber/static/fiber/js/file-uploader-3.2.0/client/js/handler.form.js
@@ -103,8 +103,7 @@ qq.UploadHandlerForm = function(o, uploadCompleteCallback, logCallback) {
protocol = options.demoMode ? "GET" : "POST",
form = qq.toElement('<form method="' + protocol + '" enctype="multipart/form-data"></form>'),
endpoint = options.endpointStore.getEndpoint(id),
- url = endpoint,
- extraFields = options.customFields;
+ url = endpoint;
params[options.uuidParamName] = uuids[id];
@@ -118,15 +117,6 @@ qq.UploadHandlerForm = function(o, uploadCompleteCallback, logCallback) {
form.setAttribute('action', url);
form.setAttribute('target', iframe.name);
form.style.display = 'none';
-
- // Add csrf token to the form
- qq.each(extraFields, function(name, val) {
- var input;
- input = document.createElement('input');
- input.setAttribute('name', name);
- input.setAttribute('value', val);
- form.appendChild(input);
- });
document.body.appendChild(form);
return form;
View
1 fiber/static/fiber/js/file-uploader-3.2.0/client/js/uploader.basic.js
@@ -12,7 +12,6 @@ qq.FineUploaderBasic = function(o){
params: {},
paramsInBody: false,
customHeaders: {},
- customFields: {},
forceMultipart: true,
inputName: 'qqfile',
uuidName: 'qquuid',

0 comments on commit 1e3d7d9

Please sign in to comment.
Something went wrong with that request. Please try again.