Add support for attachment file names
Send, receive, and save attachment filenames. Use them as suggested names when saving files. // FREEBIE
This commit is contained in:
parent
a256f17e19
commit
fc514aa96f
5 changed files with 18 additions and 2 deletions
|
@ -223,12 +223,17 @@
|
|||
},
|
||||
|
||||
readFile: function(file) {
|
||||
var contentType = file.type;
|
||||
return new Promise(function(resolve, reject) {
|
||||
var FR = new FileReader();
|
||||
FR.onload = function(e) {
|
||||
resolve({data: e.target.result, contentType: contentType});
|
||||
resolve({
|
||||
data: e.target.result,
|
||||
contentType: file.type,
|
||||
fileName: file.name
|
||||
});
|
||||
};
|
||||
FR.onerror = reject;
|
||||
FR.onabort = reject;
|
||||
FR.readAsArrayBuffer(file);
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue