diff options
Diffstat (limited to 'js/io/system/coreioapi.js')
-rwxr-xr-x | js/io/system/coreioapi.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index 7edb469b..e2c2e4dd 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js | |||
@@ -402,15 +402,16 @@ exports.CoreIoApi = Montage.create(Component, { | |||
402 | xhr = new XMLHttpRequest(); | 402 | xhr = new XMLHttpRequest(); |
403 | // | 403 | // |
404 | xhr.open("POST", serviceURL, false); | 404 | xhr.open("POST", serviceURL, false); |
405 | xhr.responseType = "arraybuffer"; | ||
405 | if(file.contentType && file.contentType.length) | 406 | if(file.contentType && file.contentType.length) |
406 | xhr.setRequestHeader("Content-Type", file.contentType); | 407 | xhr.setRequestHeader("Content-Type", file.contentType); |
407 | else | 408 | else |
408 | xhr.setRequestHeader("Content-Type", "text/plain"); | 409 | xhr.setRequestHeader("Content-Type", "text/plain"); |
409 | 410 | ||
410 | if(file.contents && file.contents.length) | 411 | if (file.contents) |
411 | xhr.send(file.contents); | 412 | xhr.send(file.contents); |
412 | else | 413 | else |
413 | xhr.send(); | 414 | xhr.send(); |
414 | 415 | ||
415 | if (xhr.readyState === 4) { | 416 | if (xhr.readyState === 4) { |
416 | retValue.status = xhr.status; | 417 | retValue.status = xhr.status; |