-
Notifications
You must be signed in to change notification settings - Fork 96
Description
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?