1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-25 15:32:52 +00:00

Fix image/jpg

This commit is contained in:
M66B 2022-02-15 15:34:05 +01:00
parent b5413bc830
commit c9fac1eabb
2 changed files with 1 additions and 5 deletions

View file

@ -3507,10 +3507,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
String type = attachment.getMimeType(); String type = attachment.getMimeType();
String title = (attachment.name == null ? file.getName() : attachment.name); String title = (attachment.name == null ? file.getName() : attachment.name);
// Fix mime type
if ("image/jpg".equals(type))
type = "image/jpeg";
ContentValues values = new ContentValues(); ContentValues values = new ContentValues();
values.put(MediaStore.Images.Media.RELATIVE_PATH, "Pictures/" + folder); values.put(MediaStore.Images.Media.RELATIVE_PATH, "Pictures/" + folder);
values.put(MediaStore.Images.Media.TITLE, title); values.put(MediaStore.Images.Media.TITLE, title);

View file

@ -242,7 +242,7 @@ public class EntityAttachment {
return "audio/midi"; return "audio/midi";
// https://www.rfc-editor.org/rfc/rfc3555.txt // https://www.rfc-editor.org/rfc/rfc3555.txt
if ("video/jpeg".equals(type)) if ("image/jpg".equals(type) || "video/jpeg".equals(type))
return "image/jpeg"; return "image/jpeg";
if (!TextUtils.isEmpty(type) && if (!TextUtils.isEmpty(type) &&