Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extension ComposeMessageAttachment {
guard let url = librarySourceMediaInfo[urlKey] as? URL else { return nil }
let data = try Data(contentsOf: url)

self.name = "\(url.lastPathComponent).pgp"
self.name = url.lastPathComponent
self.data = data
self.size = data.count
self.type = url.lastPathComponent.mimeType
Expand All @@ -50,7 +50,7 @@ extension ComposeMessageAttachment {
return nil
}

self.name = "\(UUID().uuidString).jpg.pgp"
self.name = "\(UUID().uuidString).jpg"
self.data = data
self.size = data.count
self.type = "image/jpg"
Expand All @@ -61,7 +61,7 @@ extension ComposeMessageAttachment {
return nil
}

self.name = "\(fileURL.lastPathComponent).pgp"
self.name = fileURL.lastPathComponent
self.data = data
self.size = data.count
self.type = fileURL.mimeType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ final class ComposeMessageService {
let sendableAttachments: [SendableMsg.Attachment] = contextToSend.attachments
.map { composeAttachment in
return SendableMsg.Attachment(
name: composeAttachment.name,
name: "\(composeAttachment.name).pgp",
type: composeAttachment.type,
base64: composeAttachment.data.base64EncodedString()
)
Expand Down