We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
ckienquoc
5 years agoExplorer | Level 4
Cannot Download File by using API
I've tried to download a file using Dropbox API & PHP with the following code:
$out_fp = fopen($local_tmp_file_path, 'w+');
$headers = array( 'Authorization: Bear...
- 5 years ago
Thanks, that's helpful. I see your client is passing up 'Content-Length: -1', which is incorrect. Mine is not doing that, so it may depend on what version of curl/PHP you're using.
Try explicitly specifying a header of: 'Content-Length: 0'.
Greg-DB
Dropbox Community Moderator
5 years agoThanks, that's helpful. I see your client is passing up 'Content-Length: -1', which is incorrect. Mine is not doing that, so it may depend on what version of curl/PHP you're using.
Try explicitly specifying a header of: 'Content-Length: 0'.
ckienquoc
5 years agoExplorer | Level 4
Awesome! thank you so much ❤️
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!