File Button > File Upload No Longer Works

The new file button provides the file as base64 data, which does not work when trying to upload to a rest endpoint via Form Data and selecting "file" for the body value type.

Your documentation still references the old file picker component that provides the correct file data object.

2 Likes

The workaround seems to be to merge the value and files properties when using the new file upload/dropzone.

Assuming your file upload component is called "fileUpload", create a new transformer:

return {
  data: {{fileUpload.value[0]}},
  ...{{fileUpload.files[0]}}
}

Really, the files array should include the data property to make this just work out of the box.

2 Likes

This is in the queue to be fixed!

2 Likes

thanks for the tips, fixed my issue

Thank you!!!!

Where/how can I create a new transformer? I am new to Retool and have been on/off talking to support for almost a week and still not going anywhere.

Hey jmc, you can create a new JS transformer in the query editor at the bottom of the page. In the same dropdown you would use to create any query type.


1 Like

any updates on this ticket? It was opened a while ago - would be great to have file components meet web standards.

Hey @andr3w unfortunately there are no updates at this time. I've updated the internal ticket to advocate for a permanent fix, but this ticket is still currently in the backlog. We can update this thread here when we have any additional information on its status.