dotCMS / dotCMS/core

AssetPicker: multi-file selection uploads only the first file

Open
#37,370 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team : Scout Type : Defect
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Description

The AssetPicker accepts a multi-file selection, warns the user that only one file will be uploaded, and then uploads the first file. The rest are discarded.

This is the same defect as #37166, in a second place. The logic was copy-pasted rather than shared, so fixing Content Drive does not fix this: dot-asset-picker.component.ts has its own first-file-only upload path and its own call to the same warning.

An author selecting five images to insert gets one, and is told so only by a transient warning they may not read.

Acceptance Criteria
  • Selecting or dropping several files in the AssetPicker uploads all of them
  • The "only one file will be uploaded" warning is gone
  • The outcome reports how many files were actually created, not how many were selected
  • A file that fails does not stop the others, and the author is told which ones failed and why
Priority

Medium

Additional Context

A bulk path already exists in the codebase and needs no new endpoint. POST /api/v1/temp accepts several files in one multipart request and returns a temp id per file; a single default-action fire then creates one contentlet per id. DotUploadFileService.publishContent already does exactly this end to end, and uploadFileByBaseType — the method the AssetPicker currently calls one file at a time — already accepts a temp id as an alternative to a File.

Shared message keys. The AssetPicker references content-drive.file-upload-in-progress, its -detail, content-drive.work-in-progress and content-drive.multiple-files-warning. #37166 stops Content Drive using all four but leaves the definitions in place precisely so this component keeps working. Whoever fixes this should remove them once nothing references them.

Related: #37166 (the same defect in Content Drive), #36702, #37207.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in dot-asset-picker.component.ts and trace its uploadFileByBaseType path; compare it with DotUploadFileService.publishContent and the POST /api/v1/temp bulk flow. Done means all selected files are handled independently, the result reports created and failed files with reasons, the warning keys have no remaining references, and the acceptance criteria pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
Domain
api, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.