mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-08 07:00:54 +03:00
fixes issues 195 and 192
This commit is contained in:
@@ -65,7 +65,7 @@ $(document).ready(function() {
|
||||
return;
|
||||
})
|
||||
.then(([decrypted, fname]) => {
|
||||
name.innerText = fname;
|
||||
name.innerText = decodeURIComponent(fname);
|
||||
const dataView = new DataView(decrypted);
|
||||
const blob = new Blob([dataView]);
|
||||
const downloadUrl = URL.createObjectURL(blob);
|
||||
@@ -74,10 +74,10 @@ $(document).ready(function() {
|
||||
a.href = downloadUrl;
|
||||
if (window.navigator.msSaveBlob) {
|
||||
// if we are in microsoft edge or IE
|
||||
window.navigator.msSaveBlob(blob, fname);
|
||||
window.navigator.msSaveBlob(blob, decodeURIComponent(fname));
|
||||
return;
|
||||
}
|
||||
a.download = fname;
|
||||
a.download = decodeURIComponent(fname);
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
})
|
||||
|
||||
@@ -131,7 +131,7 @@ class FileSender extends EventEmitter {
|
||||
JSON.stringify({
|
||||
aad: arrayToHex(hash),
|
||||
id: fileId,
|
||||
filename: file.name
|
||||
filename: encodeURIComponent(file.name)
|
||||
})
|
||||
);
|
||||
xhr.send(fd);
|
||||
|
||||
Reference in New Issue
Block a user