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

This commit is contained in:
Micah Lee 2019-02-18 10:57:20 -08:00
parent 879cf687b1
commit 3e2901ad8c
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 2 additions and 2 deletions

View file

@ -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);
});
});