better error handling in file download

pull/1/head
ansuz 8 years ago
parent 42f3a62cac
commit 69e933dd17

@ -175,8 +175,8 @@ define([
if (!uploadMode) {
var src = Cryptpad.getBlobPathFromHex(hexFileName);
return Cryptpad.fetch(src, function (e, u8) {
if (e) { return void Cryptpad.alert(e); }
// now decrypt the u8
if (e) { return window.alert('error'); }
var cryptKey = secret.keys && secret.keys.fileKeyStr;
var key = Nacl.util.decodeBase64(cryptKey);

Loading…
Cancel
Save