Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Roon
9 years agoExplorer | Level 4
Share Link Redirect URL has no Content-Length
I'm trying to get the filesize from a shared link: Looking at the answer to [this post] - the shared link creates a redirect to the file, which should provide a filesize in the headers.. It ...
- 9 years agoI don't believe there is a way to find out the size ahead of time unfortunately.
deFreitas
9 years agoNew member | Level 2
Content-Length is not required, Your shared link is a folder then Dropbox is probably dynamically zipping it, that is probably the reason why it have not a length
Greg-DB
Dropbox Community Moderator
9 years agoThat's correct, my sample was a link for a file, so it can offer a Content-Length. Your example is a link for a folder, which is compressed on the fly, so the Content-Length isn't available.
- Roon9 years agoExplorer | Level 4Thanks..
So I take that to mean that the compression is incomplete when the headers are sent.. and consequently there is no known size..
Leading me to the question, how am i supposed to know the compressed file-size of a folder prior to downloading it? (I need to indicate progress as a percentage)- Greg-DB9 years ago
Dropbox Community Moderator
I don't believe there is a way to find out the size ahead of time unfortunately.- sechel8 years agoExplorer | Level 3
Hey there,
there is an easy solution to this question: Do a HEAD request with a Range:bytes=0- header. Then you will have a Content-Length header in the response 😀 Hope that helps, greetings
Stefan
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!