Skip to content

feat: add deferUpload mode to MediaGallery#12

Merged
KruGoL merged 1 commit into
mainfrom
feat/mediagallery-defer-upload
Jun 19, 2026
Merged

feat: add deferUpload mode to MediaGallery#12
KruGoL merged 1 commit into
mainfrom
feat/mediagallery-defer-upload

Conversation

@KruGoL

@KruGoL KruGoL commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

MediaGallery uploaded screenshots immediately, which needs an existing ownerId, so
it could not be used on entity-create forms (no project id yet). Add a deferUpload
mode mirroring MediaUploader's: chosen screenshots are kept locally (File + blob
preview, reorderable) and the current File list is emitted via onFilesChange, so
the parent uploads them after the entity exists and patches media.

Non-defer behaviour is unchanged. Dimension validation still applies (the inner
MediaUploader runs it before onFileSelected). Adds a test for the defer path.

MediaGallery uploaded screenshots immediately, which needs an existing ownerId, so
it could not be used on entity-create forms (no project id yet). Add a deferUpload
mode mirroring MediaUploader's: chosen screenshots are kept locally (File + blob
preview, reorderable) and the current File list is emitted via onFilesChange, so
the parent uploads them after the entity exists and patches media.

Non-defer behaviour is unchanged. Dimension validation still applies (the inner
MediaUploader runs it before onFileSelected). Adds a test for the defer path.
@KruGoL KruGoL merged commit cf55754 into main Jun 19, 2026
@KruGoL KruGoL deleted the feat/mediagallery-defer-upload branch June 19, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant