npm.io
73.3.0 • Published 1 week ago

@atlaskit/media-picker

Licence
Apache-2.0
Version
73.3.0
Deps
16
Size
493 kB
Vulns
0
Weekly
0

Media picker

Drop positioning

When platform_editor_media_drop_position experiment's isEnabled parameter is true, Dropzone accepts optional onDragOver(event) and onDropWithContext(event, traceContext) callbacks. The latter runs before upload preparation. Return false to reject the drop, or a cleanup function to release preparation state after all upload batches have been prepared.

Use onUploadsStart and its matching traceContext.traceId to associate media file IDs with the original drop. Preview callbacks can arrive later and in a different order. The existing no-argument onDrop callback and default upload behavior remain unchanged for consumers that do not opt in.

Uploads without collection read access

With platform_media_upload_without_read enabled, uploadParams.skipRemoteFileState: true forwards the upload-only option to Media Client. upload-end is emitted after /file/upload succeeds, including when preview processing is still pending. Pair this option with a card that does not fetch remote metadata or previews. Browser and Dropzone share this upload service.