Skip to content

feat(DF-868): multiple uploads#339

Merged
mokhld merged 5 commits intomainfrom
feat/df-868-multiple-upload
Mar 25, 2026
Merged

feat(DF-868): multiple uploads#339
mokhld merged 5 commits intomainfrom
feat/df-868-multiple-upload

Conversation

@mokhld
Copy link
Copy Markdown
Contributor

@mokhld mokhld commented Mar 18, 2026

Proposed change

Allow users to select and upload multiple files on file upload pages, wiring through CDP’s multi-file responses, updating the summary list and delete links to use fileId, and keeping existing single-file behaviour unchanged.

Jira ticket: https://eaflood.atlassian.net/browse/DF-868?atlOrigin=eyJpIjoiMjZjZTRlNWE2NDJkNGUxY2FlNzkxNTYyOGQ0ZDc0NTQiLCJwIjoiaiJ9

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

mokhld added 3 commits March 18, 2026 14:20
Allow multi-file selection when the component schema permits it, and render all selected files in the client-side upload summary.
Normalise CDP status to support multiple uploaded files, key file removal by fileId, and update tests to match.
}

// Allow multiple file selection when schema permits more than 1 file
const allowsMultiple = schema.max !== 1 && schema.length !== 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thinking

@mokhld mokhld marked this pull request as ready for review March 18, 2026 15:38
const errors: FormSubmissionError[] = [
{ path: [name], href: `#${name}`, name, text }
]
cacheService.setFlash(request, { errors })
Copy link
Copy Markdown
Contributor

@jbarnsley10 jbarnsley10 Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this overwrite the previous error if more than one file in error? Does it need to track potentially multiple errors or not really needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a fantastic spot. I've pushed an update to fix this.

Copy link
Copy Markdown
Contributor

@jbarnsley10 jbarnsley10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Just one question

Prevents loss of error messages when multiple files fail upload.
@sonarqubecloud
Copy link
Copy Markdown

@mokhld mokhld merged commit 61d0a39 into main Mar 25, 2026
24 checks passed
@mokhld mokhld deleted the feat/df-868-multiple-upload branch March 25, 2026 13:46
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.

3 participants