[feature]: allow attaching multiple files at once to a work item
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 59.6k
- Forks
- 5.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 49
Description
Is there an existing issue for this?
- I have searched the existing issues
Summary
Work item attachments can only be added one file at a time. In apps/web/core/components/issues/attachment/attachment-upload.tsx the dropzone is configured with multiple: false, and onDrop takes only the first entry:
const onDrop = useCallback((acceptedFiles: File[]) => {
const currentFile: File = acceptedFiles[0];
...
});
const { getRootProps, ... } = useDropzone({
onDrop,
maxSize: maxFileSize,
multiple: false,
disabled: isLoading || disabled,
});
Two consequences:
- The file picker does not let you select more than one file.
- If you drag and drop several files at once, only the first is uploaded and the rest are silently discarded — no error, no indication. That part reads more like a bug than a limitation.
Why should this be worked on?
Attaching a set of files is the normal case, not the exception: a handful of screenshots for a bug report, a log bundle, several exported documents. Right now each file is a separate drag-and-wait cycle, and dropping them together looks like it worked while quietly dropping all but one.
Backend impact
None. IssueAttachmentV2Endpoint.post already creates exactly one FileAsset and one presigned POST per call, so the client can simply fan out N calls — no bulk endpoint is needed. (Note ProjectBulkAssetEndpoint is not applicable here: it binds already-uploaded description/cover assets to an entity and has no ISSUE_ATTACHMENT branch.) The per-file size limit still applies unchanged via maxFileSize / FILE_SIZE_LIMIT.
Proposed change
In attachment-upload.tsx:
- set
multiple: true - iterate
acceptedFileswith bounded concurrency instead of taking[0] - show progress as
Uploading 2/5...while the batch runs - treat per-file failures as non-fatal: report which files were rejected (size / MIME) and keep the successful ones, rather than failing the whole batch
Happy to open the PR if maintainers are open to it.
Version
- Self-hosted (Kubernetes), code reviewed against v1.4.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/web/core/components/issues/attachment/attachment-upload.tsx and trace the dropzone callback and existing upload state. The work is done when selecting or dropping multiple files uploads each file with bounded concurrency, shows batch progress, preserves successful uploads, and identifies per-file failures without stopping the batch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100