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
|
@ -7,7 +7,7 @@ import type {
|
|||
InMemoryAttachmentDraftType,
|
||||
} from '../types/Attachment';
|
||||
import {
|
||||
getMaximumAttachmentSizeInKb,
|
||||
getMaximumOutgoingAttachmentSizeInKb,
|
||||
getRenderDetailsForLimit,
|
||||
KIBIBYTE,
|
||||
} from '../types/AttachmentSize';
|
||||
|
@ -75,7 +75,7 @@ export async function processAttachment(
|
|||
}
|
||||
|
||||
function isAttachmentSizeOkay(attachment: Readonly<AttachmentType>): boolean {
|
||||
const limitKb = getMaximumAttachmentSizeInKb(getRemoteConfigValue);
|
||||
const limitKb = getMaximumOutgoingAttachmentSizeInKb(getRemoteConfigValue);
|
||||
// this needs to be cast properly
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue