Page MenuHomePhabricator

D10086.diff
No OneTemporary

D10086.diff

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,21 @@
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 MultimediaUploadExtras = Shape<{
- ...Dimensions,
- loop: boolean,
- encryptionKey: string,
- thumbHash: ?string,
+export type MultimediaUploadCallbacks = Partial<{
+ +onProgress: (percent: number) => void,
+ +abortHandler: (abort: () => void) => void,
+ +uploadBlob: UploadBlob,
+ +blobServiceUploadHandler: BlobServiceUploadHandler,
+ +timeout: ?number,
}>;
+export type MultimediaUploadExtras = $ReadOnly<
+ Partial<{
+ ...Dimensions,
+ +loop: boolean,
+ +encryptionKey: string,
+ +thumbHash: ?string,
+ }>,
+>;
const uploadMultimedia =
(

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 2, 11:50 AM (19 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2607484
Default Alt Text
D10086.diff (1 KB)

Event Timeline