summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-23 22:49:57 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-23 22:50:22 (GMT)
commit3c2a152af0d37fd687198f56819b05f389996bc1 (patch)
tree26b6df57c9a8fbf7327a8e4efbf602578db531e1 /www
parent3f428828c7db98a7606a9f4902fa017758bfadfb (diff)
rhimportd uses a different file upload now
Diffstat (limited to 'www')
-rw-r--r--www/js/importer.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/www/js/importer.js b/www/js/importer.js
index 2a96ff7..8bc525e 100644
--- a/www/js/importer.js
+++ b/www/js/importer.js
@@ -376,18 +376,18 @@ Rdxport.Upload.prototype.onmessage = function(event) {
console.log(data);
if (this.file && !this.sendingFile) {
this.sendingFile = true;
-
- // todo: post request goes here.
- /*var command = {
- LOGIN_NAME: this.username,
- SESSION_ID: data.ID,
- FILENAME: 'filename!',
- data: self.file,
- mimeTypes:"multipart/form-data"
+
+ var command = {
+ type: "POST",
+ contentType: "application/octet-stream",
+ data: this.file,
+ processData: false,
+ dataType: 'json',
+ error: function(req, status, err) { console.log({StatusText: status, ErrorString: err}); },
+ success: function(data, status, req) { console.log(data); }
};
- return $.post('https://import.helsinki.at/upload', command);*/
+ $.ajax('https://import.helsinki.at/upload/' + importer.username + '/' + data.ID, command);
}
-
this.group.fetchCarts();
this.groupView.uploadProgress(this);
break;