summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-02-18 10:57:20 -0800
committerMicah Lee <micah@micahflee.com>2019-02-18 10:57:20 -0800
commit3e2901ad8c17a2cff59d2a3623ebe1a96164aeb5 (patch)
treea394e8a36fc31e2daa07080ef74cfbb11c148635 /share
parent879cf687b16e4bf67ba114a8e9f68851938744e1 (diff)
downloadonionshare-3e2901ad8c17a2cff59d2a3623ebe1a96164aeb5.tar.gz
onionshare-3e2901ad8c17a2cff59d2a3623ebe1a96164aeb5.zip
Fix minor bugs: When making the ajax POST request, strip the trailing slash from window.location.pathname so the URL works in public mode; and add a newline before printing message when receiving file
Diffstat (limited to 'share')
-rw-r--r--share/static/js/receive.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/static/js/receive.js b/share/static/js/receive.js
index 02c37b3f..c29c726c 100644
--- a/share/static/js/receive.js
+++ b/share/static/js/receive.js
@@ -121,7 +121,7 @@ $(function(){
$('#uploads').append($upload_div);
// Send the request
- ajax.open('POST', window.location.pathname + '/upload-ajax', true);
+ ajax.open('POST', window.location.pathname.replace(/\/$/, '') + '/upload-ajax', true);
ajax.send(formData);
});
});