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
|
@ -1,15 +1,12 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type {
|
||||
AttachmentType,
|
||||
DownloadedAttachmentType,
|
||||
} from '../types/Attachment';
|
||||
import { downloadAttachment as doDownloadAttachment } from '../textsecure/downloadAttachment';
|
||||
import type { AttachmentType } from '../types/Attachment';
|
||||
import { downloadAttachmentV2 as doDownloadAttachment } from '../textsecure/downloadAttachment';
|
||||
|
||||
export async function downloadAttachment(
|
||||
attachmentData: AttachmentType
|
||||
): Promise<DownloadedAttachmentType | null> {
|
||||
): Promise<AttachmentType | null> {
|
||||
let migratedAttachment: AttachmentType;
|
||||
|
||||
const { server } = window.textsecure;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue