1
0
mirror of https://github.com/RobinLinus/snapdrop.git synced 2025-05-18 08:30:09 -07:00

iOS Refactor fallback hack

This commit is contained in:
RobinLinus 2018-10-11 00:38:06 +02:00
parent a74e3fad1a
commit aa999e13c5

View File

@ -239,11 +239,9 @@ class ReceiveDialog extends Dialog {
if (window.isDownloadSupported) return; if (window.isDownloadSupported) return;
// fallback for iOS // fallback for iOS
$a.href = '#'; $a.target = '_blank';
let reader = new FileReader(); let reader = new FileReader();
reader.onload = e => { reader.onload = e => $a.href = reader.result;
$a.onclick = e=>window.open(reader.result,'_blank');
}
reader.readAsDataURL(file.blob); reader.readAsDataURL(file.blob);
} }