Concerning attachments & embedded media

I’ve come straight from github for some advice if possible…

From here

I simply cannot find the location where my downloaded attachments are stored. Neither by navigating to the correct folder using a file explorer nor by using the search field of my file explorer to locate the files

I have a Pixel 2 XL running Android 11 and K9 version 5.718.

For me the Download Manager is not storing saved files from K9 in the Download folder. Settings > Storage > Files > Download. This is the Files app not Files by Google app. If I download an embedded image and view it in Photos the app gives the path as…

…the path pictured doesn’t exist where I can access it and I have no ability to move the file. I have Documents not /document, I don’t have a folder called 1483. I have searched for multiple file and folder names that I’ve managed to glean, so far as I can tell, they are not anywhere to be found.

Attachments or embedded media that aren’t saved but instead opened in a viewer are stored here: com.fsck.k9.tempfileprovider/temp I believe. A .zip opened in KeePassDroid, which listed the path. I can’t see a way to save these files. There is no option in k9 nor in the apps they happen to open in.

Is this an issue or expected behavior? Thank you.

To save an attachment tap the disk icon on the right side of the attachment box. You’ll be prompted for a location to save the attachment to.
If you tap anywhere else in the attachment box K-9 Mail will ask the OS to display the attachment. This only works if a suitable app is installed. If such an app is installed K-9 Mail will grant it temporary access to the attachment. Just to view an attachment K-9 Mail will not write the file to a location that is accessible to other apps or the user.

When dealing with images that are displayed as part of the email body K-9 Mail distinguishes between two cases:

  • The image could be part of the email. In that case long-pressing the image shows the options “View image” and “Save image”. Both options work like the corresponding actions on regular attachments (described above).
  • It could also be a reference to an external image. In that case long-pressing the image shows the options (“View image”, “Download image”, and “Copy image URL to clipboard”). The view option asks the OS to display the URL. This will most likely open a browser. The download option will use Download Manager to download the image. K-9 Mail does not specify a download location and apparently “By default, downloads are saved to a generated filename in the shared download cache and may be deleted by the system at any time to reclaim space”. I’m fairly confident this wasn’t the case in the past. But I guess that explains why you can’t find the file. Until we fix this you could open the image in the browser and use its save functionality.
1 Like

Thanks cketti, concerning the attachment question, sorry for making you point out the obvious. I can only suggest I left my brain in the fridge today, I knew this but somehow forgot! I never tested tapping the icon. :man_facepalming:

Everything you say concerning images that are displayed as part of the email body - the options shown etc - reflects my experience exactly.

Until we fix this you could open the image in the browser and use its save functionality.

…and this is a perfectly sensible stop-gap.

How and where can I store (“safe”) email attachments with K-9 Version 5.806 opperating on ANDROID10?
At any place chosen to safe the attachment a note pops up" The fol can not be stored here.
(Permision to storage was not asked on app-informations and could not be found) Is this a bug?

Mhm, no way ro have that changed? Very often, I want to view an attachement first and then directly send it to my Dropbox or forward to someone from the “share”-icon within my viewer. This way the filename is random numbers, what makes it much more difficult later.

I think my behavior is not uncommon. I dont want to save everything to the phone unseen, sometimes I click through 5 attachements until I found the correct one to forward…

Would be great if this could be altered.

Best
Sebastian

This sounds like a bug in the app displaying the content. The app should query the content URI to get the proper display name (see OpenableColumns). If it instead tries to extract a filename from the URI, you’ll end up with a bunch of numbers.