Description
Checklist
- I can reproduce the bug with the latest version.
- I made sure that there are no existing issues - open or closed - to which I could contribute my information to.
- I have read the FAQ and my problem isn't listed.
- I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- This issue contains only one bug.
- I have read and understood the contribution guidelines.
Describe the bug
When sharing a single file that isn't a directory from any app, the file manager can be selected as destination to save the file in shared storage. However, both the file name and extension are lost when saving the file. The loss of the file extension in particular means that other programs (i.e. those that only have permissions for media files) won't be able to discover/open the file.
To Reproduce
Steps to reproduce the behavior:
- Go to any app that allows sharing a single file. The file manager itself will do. Open the share dialog.
- Look for the destination titled "File Manager", subtitle "Save..." and click on it.
- Select a directory to save the file at.
- In file manager, navigate to that directory. The file will be titled something like "1000019000" now. It will not have a file extension.
Expected behavior
Ideally, the file would keep its name and extension.
If the sharing API simply does not provide this info, file extensions can be "guessed" using a file format's magic number. This should be implemented for common file formats like zip, pdf, png, jpg, webp, gif, mp3, mp4, ogg.