tmail-flutter
tmail-flutter copied to clipboard
View PDF should preserve filename
Description
When I click on the attachment to open it in a new tab, and save it:
The filename is not preserved and I have a super weird UUID instead.
As a user this is annoying, I want the filename to be preserved!
Due to Chrome's limitation, current approach cannot achieve this. More info is discussed in the below threads:
- https://stackoverflow.com/questions/50573429/url-createobjecturlblob-how-do-i-give-a-meaningful-filename-to-a-dynamicall
- https://stackoverflow.com/questions/44061354/set-the-default-save-as-name-for-a-an-embed-or-iframe-that-uses-a-blob
- https://stackoverflow.com/questions/53548182/can-i-set-the-filename-of-a-pdf-object-displayed-in-chrome
- https://stackoverflow.com/questions/41947735/custom-name-for-blob-url
Changing solution direction to find a js library to display pdf, and try to handle download job (possibly print job also) deliberately
Decision
Different libraries was chosen for each browser below:
Use other approach. #2780