diff --git a/lib/actions/upload-actions.js b/lib/actions/upload-actions.js --- a/lib/actions/upload-actions.js +++ b/lib/actions/upload-actions.js @@ -3,7 +3,6 @@ import uuid from 'uuid'; import blobService from '../facts/blob-service.js'; -import type { Shape } from '../types/core.js'; import type { UploadMultimediaResult, Dimensions } from '../types/media-types'; import { extractKeyserverIDFromID } from '../utils/action-utils.js'; import { toBase64URL } from '../utils/base64.js'; @@ -19,19 +18,19 @@ import { handleHTTPResponseError } from '../utils/services-utils.js'; import { type UploadBlob } from '../utils/upload-blob.js'; -export type MultimediaUploadCallbacks = Shape<{ - onProgress: (percent: number) => void, - abortHandler: (abort: () => void) => void, - uploadBlob: UploadBlob, - blobServiceUploadHandler: BlobServiceUploadHandler, - timeout: ?number, +export type MultimediaUploadCallbacks = Partial<{ + +onProgress: (percent: number) => void, + +abortHandler: (abort: () => void) => void, + +uploadBlob: UploadBlob, + +blobServiceUploadHandler: BlobServiceUploadHandler, + +timeout: ?number, }>; -export type MultimediaUploadExtras = Shape<{ +export type MultimediaUploadExtras = $ReadOnly; + +loop: boolean, + +encryptionKey: string, + +thumbHash: ?string, +}>>; const uploadMultimedia = (