Resumable attachment downloads
This commit is contained in:
parent
2c92591b59
commit
38f532cdda
22 changed files with 401 additions and 89 deletions
|
@ -15,7 +15,7 @@ import type { AttachmentUploadFormResponseType } from '../textsecure/WebAPI';
|
|||
import {
|
||||
type EncryptedAttachmentV2,
|
||||
encryptAttachmentV2ToDisk,
|
||||
safeUnlinkSync,
|
||||
safeUnlink,
|
||||
type PlaintextSourceType,
|
||||
type HardcodedIVForEncryptionType,
|
||||
} from '../AttachmentCrypto';
|
||||
|
@ -117,7 +117,7 @@ export async function encryptAndUploadAttachment({
|
|||
return { cdnKey: uploadForm.key, cdnNumber: uploadForm.cdn, encrypted };
|
||||
} finally {
|
||||
if (absoluteCiphertextPath) {
|
||||
safeUnlinkSync(absoluteCiphertextPath);
|
||||
await safeUnlink(absoluteCiphertextPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue