diff options
author | zottel <github@zottel.net> | 2016-08-10 13:49:48 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2016-08-10 13:49:48 +0200 |
commit | 8706cbe1c413ed8fcfb7dcb35c7b319d2d1116bb (patch) | |
tree | 499ab4cac571c35f6d0758f157ed85af46c8b57c /view/js/mod_cloud.js | |
parent | 6ba142fd33a74a7bdb4f3dfc8c0c0f507c293a2e (diff) | |
parent | 7a557d31e026705fc3bd2d4f39c4c679449cef56 (diff) | |
download | volse-hubzilla-8706cbe1c413ed8fcfb7dcb35c7b319d2d1116bb.tar.gz volse-hubzilla-8706cbe1c413ed8fcfb7dcb35c7b319d2d1116bb.tar.bz2 volse-hubzilla-8706cbe1c413ed8fcfb7dcb35c7b319d2d1116bb.zip |
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'view/js/mod_cloud.js')
-rw-r--r-- | view/js/mod_cloud.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js index e56ec2a81..8b8a3ba3f 100644 --- a/view/js/mod_cloud.js +++ b/view/js/mod_cloud.js @@ -100,13 +100,13 @@ function prepareHtml(f, i) { } function formatSizeUnits(bytes){ - if (bytes>=1000000000) {bytes=(bytes/1000000000).toFixed(2)+' GB';} - else if (bytes>=1000000) {bytes=(bytes/1000000).toFixed(2)+' MB';} - else if (bytes>=1000) {bytes=(bytes/1000).toFixed(2)+' KB';} - else if (bytes>1) {bytes=bytes+' bytes';} - else if (bytes==1) {bytes=bytes+' byte';} - else {bytes='0 byte';} - return bytes; + if (bytes>=1000000000) {bytes=(bytes/1000000000).toFixed(2)+' GB';} + else if (bytes>=1000000) {bytes=(bytes/1000000).toFixed(2)+' MB';} + else if (bytes>=1000) {bytes=(bytes/1000).toFixed(2)+' KB';} + else if (bytes>1) {bytes=bytes+' bytes';} + else if (bytes==1) {bytes=bytes+' byte';} + else {bytes='0 byte';} + return bytes; } // this is basically a js port of include/text.php getIconFromType() function @@ -202,7 +202,7 @@ function UploadFile(file, idx) { }); // POST to the entire cloud path - xhr.open('post', window.location.pathname, true); + xhr.open('post', 'file_upload', true); var formfields = $("#ajax-upload-files").serializeArray(); @@ -210,7 +210,7 @@ function UploadFile(file, idx) { $.each(formfields, function(i, field) { data.append(field.name, field.value); }); - data.append('file', file); + data.append('userfile', file); xhr.send(data); } |