see local files using createObjectURL()

need to: 
- revoke the URL when deleting the attachment
- update the inmediate pop-up URL
This commit is contained in:
Javier Abadia 2014-04-27 02:49:27 +02:00
parent 7c7c6abb3b
commit 611d509fb0
2 changed files with 4 additions and 3 deletions

View File

@ -42,7 +42,7 @@ define([], function()
contentType: attachmentFile.type,
name: attachmentFile.name,
size: attachmentFile.size,
url: 'javascript:alert("show local attached file ' + attachmentFile.name + '");', // TODO -> download the local file
url: attachmentFile.url,
content: attachmentFile.content
});
request.onsuccess = function(event)

View File

@ -299,7 +299,7 @@ define([
{
callback && callback(results);
});
return allPromises;
};
@ -449,7 +449,8 @@ define([
name: theFile.name,
type: theFile.type,
content: evt.target.result,
size: theFile.size
size: theFile.size,
url: window.URL.createObjectURL(theFile)
});
pendingFiles--;
if( !pendingFiles )