Skip to main content

Download File Basics

  • February 25, 2024
  • 5 replies
  • 205 views

I’m running an API call to /files/[fileid]/content with just the file id in the URL and the access token in the header. It says the api call is completing successfully, but it does not actually prompt a download in the browser. It worked a while back, but I’m not sure what I changed causing it not to work any more. Any tips on what I can check would be helpful. Thanks in advance for any assistance.

5 replies

CodeBoxSeb
  • Participating Frequently
  • 58 replies
  • February 26, 2024

Hi @DavidKing !


Would it be possible to share us the piece of code you’re using to initiate your file download ? 🙂


Thanks


  • Author
  • New Participant
  • 3 replies
  • February 26, 2024

I’m using the FlutterFlow no-code platform, so there isn’t any raw code. Here is what the api call looks like though.


CodeBoxSeb
  • Participating Frequently
  • 58 replies
  • February 27, 2024

Thanks for clarifying !

Do you specify a File ID in the Default value field ?


What do you have in the Query parameters tab ?


We also need to take into account the Location parameter.

If you take a look at this page :




If the file is available for download the response will include a Location header for the file on dl.boxcloud.com.




The dl.boxcloud.com URL is not persistent and clients will need to follow the redirect to actually download the file.



So I have the feeling that you need to specify where the file should be downloaded. We need a “Location”.


  • Author
  • New Participant
  • 3 replies
  • February 27, 2024

Hmmm… it might be more of a FlutterFlow issue. I do get a header called “x-final-url” that has the download URL in test API calls, but when I tell FlutterFlow to retrieve that header in a live call it comes up blank.


CodeBoxSeb
  • Participating Frequently
  • 58 replies
  • February 27, 2024

I don’t know if you use Postman, but it’s similar to FlutterFlow. You should compare to see if you manage to download the file with the same API call on Postman. This way it will determine if the issue comes from FlutterFlow.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings