diff options
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) { |