Use streams to download attachments directly to disk
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
parent
2da49456c6
commit
99b2bc304e
48 changed files with 2297 additions and 356 deletions
|
@ -297,6 +297,16 @@ export function getNotificationDataForMessage(
|
|||
const attachment = attachments[0] || {};
|
||||
const { contentType } = attachment;
|
||||
|
||||
const tooBigAttachmentCount = attachments.filter(
|
||||
item => item.wasTooBig
|
||||
).length;
|
||||
if (tooBigAttachmentCount === attachments.length) {
|
||||
return {
|
||||
emoji: '📎',
|
||||
text: window.i18n('icu:message--attachmentTooBig--one'),
|
||||
};
|
||||
}
|
||||
|
||||
if (contentType === MIME.IMAGE_GIF || Attachment.isGIF(attachments)) {
|
||||
return {
|
||||
bodyRanges,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue