Use fixed mime type when saving multiple attachments

This commit is contained in:
M66B 2020-05-09 17:37:32 +02:00
parent 84464bbb40
commit 5ea569acba
1 changed files with 1 additions and 1 deletions

View File

@ -425,7 +425,7 @@ public class FragmentBase extends Fragment {
String name = Helper.sanitizeFilename(attachment.name);
if (TextUtils.isEmpty(name))
name = Long.toString(attachment.id);
DocumentFile document = tree.createFile(attachment.type, name);
DocumentFile document = tree.createFile(attachment.getMimeType(), name);
if (document == null)
throw new FileNotFoundException("Could not save " + uri + ":" + name);