File API & CSV to API Service

Hi All,

I have a use case where I would like for the user to upload a csv to the backendless file service and then immediately import that data into a data table. I am using the target directory logic to create a custom path each time with no issue.

However, I’m not seeing a way within the upload button component to return back the file URL so I can use it as an input to the csvURL property.

Any suggestions?

Hello @Aaron_Alpeter

You can use On Upload Success Event for this purpose.

Regards, Dima.

Thanks Dima- that’s the event I was planning on using, but my question is what do I use as the required url in the csv2table block inside that event?

In the On Upload Success event there is a context block called Uploaded Files. If you enabled the File Uploader Button component’s option Multiple Files, the value of Uploaded Files is the list (array) of URLs to uploaded files, otherwise - the value is just the URL of the file.