1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 01:06:04 +00:00

Anonymize image filename

This commit is contained in:
M66B 2020-10-02 09:35:39 +02:00
parent 9d647981db
commit 0dc4e74f04

View file

@ -3141,7 +3141,11 @@ public class FragmentCompose extends FragmentBase {
attachment.message = draft.id;
attachment.sequence = db.attachment().getAttachmentSequence(draft.id) + 1;
attachment.name = info.name;
if (privacy) {
String ext = Helper.getExtension(info.name);
attachment.name = "img" + attachment.sequence + (ext == null ? "" : "." + ext);
} else
attachment.name = info.name;
attachment.type = info.type;
attachment.disposition = (image ? Part.INLINE : Part.ATTACHMENT);
attachment.size = info.size;