Beispiel #1
0
 function saveToDisk(attachment) {
     download.createDownload({
         content: attachment.content,
         filename: attachment.filename,
         contentType: attachment.mimeType
     }, $scope.onError);
 }
Beispiel #2
0
            keychain.getUserKeyPair(userId, function(err, keys) {
                if (err) {
                    $scope.onError(err);
                    return;
                }

                var keyId = keys.publicKey._id;
                var file = 'whiteout_mail_' + userId + '_' + keyId.substring(8, keyId.length);

                dl.createDownload({
                    content: keys.publicKey.publicKey + keys.privateKey.encryptedKey,
                    filename: file + '.asc',
                    contentType: 'text/plain'
                }, onExport);
            });