diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-07-23 16:34:39 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-07-23 16:34:39 (GMT) |
commit | bb9497361b566884a1e4cb6d76a6f539383bd32c (patch) | |
tree | d8dbf2a8fa4e98258ebe5aa6fb36f8e72e018d66 /web-static/upload.html | |
parent | 2f2d09ea5aa99f1c80b12fc4e088ffc2248d690b (diff) |
greatly simplified web uploads
Diffstat (limited to 'web-static/upload.html')
-rw-r--r-- | web-static/upload.html | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/web-static/upload.html b/web-static/upload.html index 39cfa57..21d1c48 100644 --- a/web-static/upload.html +++ b/web-static/upload.html @@ -26,21 +26,16 @@ function upload() { $('#buttonupload').attr('disabled','disabled'); - var cmdData = new FormData(); - cmdData.append("LOGIN_NAME", $('#username').val()); - cmdData.append("SESSION_ID", $('#sessionid').val()); - cmdData.append("FILENAME", $('#file').get(0).files[0]); var command = { type: "POST", - contentType: false, + contentType: "application/octet-stream", + data: $('#file').get(0).files[0], processData: false, - data: cmdData, dataType: 'json', error: function(req, status, err) { result({StatusText: status, ErrorString: err}); }, success: function(data, status, req) { result(data); } }; - $.ajax('/public/upload', command); - + $.ajax('/public/upload/' + $('#username').val() + '/' + $('#sessionid').val(), command); } function result(data) { |