Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple files in a single request from multiple FileFields? #127

Open
billdami opened this issue Sep 12, 2016 · 1 comment
Open

Multiple files in a single request from multiple FileFields? #127

billdami opened this issue Sep 12, 2016 · 1 comment

Comments

@billdami
Copy link

My backend API has a requirement for a specific endpoint that I upload multiple files in the same request with the request parameter name for each file being explicitly set by the app to conform to a predefined format that the backend expects. Unfortunately, i can't use multiple:true in a single FileField, as this doesn't give me any control over how the files' parameters are named.

I'm thinking that I should be able to render several FileField components in the UI, and have their parent component (or controller) instantiate and own a single Uploader instance. Each FileField component would then send their file up to the parent via an action when its files changes, and would be combined into a single set of files by the parent once the user submits the upload. Would that work? The only part I'm still hazy on is how I could go about naming the form parameters used for each file, is that possible?

@digitaltoad
Copy link
Member

Are you still stuck on this? Sorry for the late reply.

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

No branches or pull requests

2 participants