Skip to content

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

@billdami

Description

@billdami

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions