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!

1 Like

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