mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Use v4/attachments endpoint for attachment upload forms
This commit is contained in:
@@ -11,7 +11,7 @@ import { strictAssert } from './assert';
|
||||
import { backupsService } from '../services/backups';
|
||||
import { tusUpload } from './uploads/tusProtocol';
|
||||
import { defaultFileReader } from './uploads/uploads';
|
||||
import type { AttachmentV3ResponseType } from '../textsecure/WebAPI';
|
||||
import type { AttachmentUploadFormResponseType } from '../textsecure/WebAPI';
|
||||
import {
|
||||
type EncryptedAttachmentV2,
|
||||
encryptAttachmentV2ToDisk,
|
||||
@@ -79,7 +79,7 @@ export async function encryptAndUploadAttachment({
|
||||
const { server } = window.textsecure;
|
||||
strictAssert(server, 'WebAPI must be initialized');
|
||||
|
||||
let uploadForm: AttachmentV3ResponseType;
|
||||
let uploadForm: AttachmentUploadFormResponseType;
|
||||
let absoluteCiphertextPath: string | undefined;
|
||||
|
||||
try {
|
||||
@@ -129,7 +129,7 @@ export async function uploadFile({
|
||||
}: {
|
||||
absoluteCiphertextPath: string;
|
||||
ciphertextFileSize: number;
|
||||
uploadForm: AttachmentV3ResponseType;
|
||||
uploadForm: AttachmentUploadFormResponseType;
|
||||
}): Promise<void> {
|
||||
const { server } = window.textsecure;
|
||||
strictAssert(server, 'WebAPI must be initialized');
|
||||
|
||||
Reference in New Issue
Block a user