apollo-studio-community icon indicating copy to clipboard operation
apollo-studio-community copied to clipboard

Map construction changes when you upload more than one file

Open lvalladares opened this issue 2 years ago • 1 comments

Context

When you upload only one file, the "map" attribute sent in the multipart request look like this: map: {"0":["variables.contractor.driversLicense.licenseFile.file"]}

But when you try to upload more than one file, the map changes and look like this

map: {"0":["0.variables.contractor.driversLicense.licenseFile.file"],"1":["1.variables.contractor.signedContract.file"]} 0: (binary)

(notice the number before the "variables" part) which doesnt follow the spec.

If I remove the number before the "variables" string and send a cURL the server handles the upload properly

What type of feedback is this?

  • [ ] Question
  • [ ] Idea
  • [x] Bug
  • [ ] New example or operation collection

lvalladares avatar Dec 17 '23 16:12 lvalladares

I can confirm this behavior and this makes it impossible to upload multiple files. Is there any reason behind this implementation or is it just a bug? 🙂

P.S.: Nonetheless, the possibility to upload a file via the Sandbox is awesome 🚀 It helps testing an API a lot.

coeing avatar Aug 29 '24 15:08 coeing