react-component / react-component/upload
`multiple` with `customRequest`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 323
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
Hi, i'm trying to allow multiple files upload with customRequest.
const foo = (file) => {
console.log(file);
};
<Upload
multiple
customRequest={foo}
...
My issue is that file is being logged once per file instead of receiving an array of files as a native file input would do.
Do you know anyway around this? If not I would need to add these files to state and somehow determine when no more files and only then trigger the request... which is not desired.
Thanks!
Contributor guide
No contributing guide indexed for this repository
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 at the Upload component's customRequest path and inspect how each selected file is passed to the callback. Clarify whether multiple selection should provide one array or preserve per-file requests, then add coverage for the chosen behavior and verify that all selected files are handled together.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100