Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Makhlouf
6 years agoExplorer | Level 3
Programmatically download a shared file using C++ Curl
Hi,
I developped an aplication in C++ that runs on Windows. I am trying to add a feauture in the program to download a shared file from my dropbox folder. I would like the downloading to go in back...
Здравко
6 years agoLegendary | Level 20
Hi Makhlouf,
Did you try: https://www.dropbox.com/s/9thz78bwfeykqra/version.dat?raw=1 in your code? :thinking:
Makhlouf
6 years agoExplorer | Level 3
Dear Здравко,
Yes, I tried it and got me same error (6) CURL_COUDNT_RESOLVE_HOST.
There is one observation to mention here.
If I comment the line: curl_easy_setopt (curl,CURLOPT_FOLLOWLOCATION,1) ; the function curl_easy_perform () returns 0 which means no error, but the file size is 0 bytes.
When I decomment the above line, curl_easy_perform () returns 6. and the file size is still 0 bytes.
- Здравко6 years agoLegendary | Level 20
I can confirm that your code works using either "raw=1" or "dl=1" endings. Seems you have network issues. That's it. ( Of course could be done some improvements in the code, like detect and automatically save in corresponding file, accordingly named file for example :wink: )
Good luck!
- Makhlouf6 years agoExplorer | Level 3Dear Здравко, 1- Can you advise me where I can download a libcurl.dll file that should work for me. I need to make sure whether the issue source is the network or missing option in the library. 2- Also, I could not follow you regarding the improvement you suggested to my code. What do you mean by automatically save in corresponding file. Please explain more. Thanks a lot.
- Здравко6 years agoLegendary | Level 20
Hi Makhlouf,
All you need (including sourcing, binary and tutorials) is here: https://curl.haxx.se/
Again, Good luck!
ADD: As lib curl is a C library, but you are trying C++ coding, might be better take a look here: http://www.curlpp.org/ also.
About Dropbox API Support & Feedback
Find help with the Dropbox API from 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!