-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Uploading array of files #586
Comments
@oguzbilgic Neat idea. Would you mind opening a PR? You could work around this today by passing in an array to your mutations constructor and mapping each file to a unique key in |
Thanks for filing this issue @oguzbilgic! This is important, so I'm going to fold it into #538, which is about overhauling the mutations API. (It will be easier to manage with the various interrelated mutations issues in a single place.) |
@oguzbilgic were you able to find a solution for this? |
@oguzbilgic also interested to hear if you found a solution 👍 |
A suggestion was made on facebook#586 but I thought using FileList instead of [File] was a better idea since I would not need to loop through the FileList (since its what is provided the HTML file input's API) to construct an array of files every time I need to send multiple files to a Mutation, this way Relay will handle it for me, I just need to send FileList or File object.
I think a file map makes more sense, should use the filename in the key and disregard it on server |
Is there a way to upload array of files?
Would it make sense to improve FileMap type to something like this:
The text was updated successfully, but these errors were encountered: