Download file from server action
Unanswered
Thai posted this in #help-forum
ThaiOP
I need to download a file from external API, and I find a lot of troubles trying to download the file using server actions, but for some reason i get the file corrupt when i try to open it.
2 Replies
what does the server action in this case do? Download the file from somewhere directly? Fetch an url from the external api that points to the file? ...?
ThaiOP
fetch an external api, and the api returns the file in the request
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8