Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3396334
D10086.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10086.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D10086: [lib] Replace Shape<> with $ReadOnly<Partial<>> in MultimediaUploadExtras
Attached
Detach File
Event Timeline
Log In to Comment