Anonymize image filename

pull/187/head
M66B 4 years ago
parent 9d647981db
commit 0dc4e74f04

@ -3141,6 +3141,10 @@ public class FragmentCompose extends FragmentBase {
attachment.message = draft.id;
attachment.sequence = db.attachment().getAttachmentSequence(draft.id) + 1;
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);

Loading…
Cancel
Save