You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
alicera
4 years agoExplorer | Level 3
check download file
If I get a link for dropbox and I use the 'wget' to download it.
How to check it if download successfully?
- 3 years ago
alicera In addition to the method Здравко helpfully provided, you could use the /2/sharing/get_shared_link_metadata Dropbox API endpoint to retrieve the metadata for a shared link, or an error if the shared link is invalid.
Greg-DB
4 years agoDropbox Staff
You can check the HTTP status code of the response to see what the result is. For example, a 200 indicates success.
- alicera4 years agoExplorer | Level 3
wget -nc dropbox_url
It will download other file.
- Greg-DB4 years agoDropbox Staff
I'm not sure I understand your latest message. Do you have a question a I can help with?
- Здравко4 years agoLegendary | Level 20
Hi alicera,
For any kind of error that might come up on command line, you can check the retrieved result. For most commands (including 'wget'), success is denoted by zero. Any different exit status means that something happens considered as a error. File not found (HTTP status 404) gets transformed to server issued an error response - exit status 8, for example.
alicera wrote:wget -nc dropbox_url
It will download other file.
No, no another file will get downloaded, while 'dropbox_url' keeps the same. Keep in mind that in such a case existing file is NOT considered error! That's why you're getting success and probably got confused. 🙂 To force existing file consideration as an error, you can use something like:
wget -nc -O filename.ext dropbox_url
Where 'filename.ext' is the desirable file name (possibly path prepended). Now (after explicit destination pointing) a try downloading already existing file (probably downloaded before) will result in general error (exit status 1, no more 0), which you can check. 😉
Hope this helps.
- alicera3 years agoExplorer | Level 3
https://unix.stackexchange.com/questions/474805/verify-if-a-url-exists
I use the method and give error dropbox link,
it is return link exist
About Discuss Dropbox Developer & API
Make connections with other developers
797 PostsLatest Activity: 3 months agoIf 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 or Facebook.
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!