Closed williamdes closed 4 days ago
I'm able to reproduce it. I'll take the issue
The problem is not limited to a specific attachment type or viewer app.
The problem is that when opening an attachment for viewing, the app uses AttachmentTempFileProvider
without setting a display name. This leads to the name of the internal temporary file the app creates when opening an attachment to be used. However, it's just a SHA1 hash without a file extension. When sharing the content to another app (or back to K-9 Mail), the viewer app simply uses the name it has (which is not the right one).
This can be fixed by adding a displayName
parameter to AttachmentTempFileProvider.createTempUriForContentUri()
and then changing
to
Uri tempFileUri = FileProvider.getUriForFile(context, AUTHORITY, tempFile, displayName);
Reopening this issue because PR #8048 fixes an entirely different issue.
Checklist
App version
6.804
Where did you get the app from?
Google Play
Android version
14
Device model
No response
Steps to reproduce
if you actually send the email thinking you attached a PDF, without any file extension the recipient will not be able to use it.
Maybe this is related to https://github.com/thunderbird/thunderbird-android/issues/2789
Expected behavior
Have the .pdf extension
Actual behavior
No extension
I actually thinked it was due to GrapheneOS's PdfViewer: https://github.com/GrapheneOS/PdfViewer/issues/334 But they said it is in K-9 mail and say it also can be reproduced by using google pdf viewer
Logs
No response