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.
The workaround seems to be to merge the
files properties when using the new file upload/dropzone.
Assuming your file upload component is called "fileUpload", create a new transformer:
Really, the files array should include the
data property to make this just work out of the box.
August 15, 2021, 9:23pm
This is in the queue to be fixed!
August 22, 2021, 6:53am
thanks for the tips, fixed my issue
September 7, 2021, 4:33pm
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.
April 12, 2023, 9:59am
any updates on this ticket? It was opened a while ago - would be great to have file components meet web standards.
@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.