Repository navigation
[TASK] Content Drive: Upload button — Asset vs File type selection #35575
Copy link
Copy link
Description
Description
When uploading to a folder with no preference set (the default state described in epic #35436), prompt the user to choose between Asset and File, and send the corresponding base type to the upload endpoint instead of the current hardcoded dotAsset.
This applies to both upload entry points:
- Clicking the Upload button.
- Drag-and-dropping files from the OS into Content Drive.
Behavior
- Triggering an upload (button click or OS drag-and-drop) prompts the user to choose between Asset (
dotAsset) and File (fileAsset).
- For the button flow, after choosing, the OS file picker opens (existing flow).
- For the drag-and-drop flow, after choosing, the dropped files are uploaded.
- The rest of the upload flow stays as-is — the only change is sending the selected base type (
dotAssetorfileAsset) to the upload endpoint instead of the current hardcodeddotAsset.
Acceptance Criteria
- Clicking Upload in the default (no preference) state prompts the user to choose Asset or File.
- Drag-and-dropping files from the OS in the default (no preference) state prompts the user to choose Asset or File.
- Selecting Asset sends
dotAssetto the upload endpoint. - Selecting File sends
fileAssetto the upload endpoint. - The existing upload flow (file picker, drag-and-drop handling, success/error handling) is unchanged beyond the base type parameter.
Out of Scope — first iteration
Tracked in epic #35436:
- Folder-level upload preferences (explicit/inherited "Assets" or "Files" states).
- Dynamic button label (
Upload Assets/Upload Files/Upload). - MIME-type routing for Assets mode.
- Preference inheritance between folders.
- Duplicate file handling (Replace / Keep both / Cancel).
- Multiple files upload.
Tracked in follow-up sub-issues (out of scope for the first iteration of this ticket):
- [TASK] Content Drive: Folder schema — add defaultBaseType field #35577 — folder schema additions:
defaultBaseType,defaultAssetType, migratedefaultFileAssetType, and expose via folder POST/PUT/GET endpoints. - [TASK] Content Drive: Folder Upload Behavior tab — defaultBaseType preference + consolidate upload settings #35578 — "Remember my preference" checkbox + new folder fields in the Create/Edit Folder dialogs.
Priority
Medium
Additional Context
- Current upload code hardcodes
dotAsset. The change is making the base type a parameter driven by user selection.
Parent epic: #35436
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(content-drive): prompt Asset vs File on upload (#35575)
3 remaining items
style(content-drive): prettier-format upload selector template (#35575)
style(content-drive): use Tailwind scale for dialog widths and dropzo…
rjvelazco commentedon Jun 30, 2026
Passed QA
dotcms/dotcms:trunk_70fdfb9]Image
feat(content-drive): prompt Asset vs File on upload (dotCMS#35575) (d…