Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
mbvistaprint
4 years agoHelpful | Level 5
Shared File Link Issues
Hi,
I'm writing to find out if anyone knows of any changes to the Drop Box service around 2/9, 2/10 that may have changed how file information is shared when using the Shared Link. For con...
Здравко
4 years agoLegendary | Level 20
Greg-DB wrote:...
In this HTTP 2 sample, the final 200 does have "Content-Length".
Just one addition to avoid confusion: There is temporary rollback, that's why "Content-Length" just appear without workaround! 😜 That gonna change at March beginning. 😉
mbvistaprint, you can see in the Greg-DB's post for HTTP/1.1 where X-Dropbox-Content-Length appear and you can use it, temporary at least (it's presence isn't guaranteed).
One more workaround example is usage of Range declaration and getting result out of Range header in response. 3 responses follow with setted "Range: bytes=0-0" (you can see where actual length is and this always works 😉) for HTTP/1.0, HTTP1.1, and mHTTP2:
HTTP/1.0 206 Partial Content Accept-Ranges: bytes Cache-Control: max-age=60 Content-Disposition: attachment; filename="SelfExamCardInside.jpg"; filename*=UTF-8''SelfExamCardInside.jpg Content-Range: bytes 0-0/4006971 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Content-Security-Policy: sandbox Etag: 1627768410839975d Pragma: public Referrer-Policy: no-referrer Vary: Origin X-Content-Security-Policy: sandbox X-Content-Type-Options: nosniff X-Dropbox-Content-Length: 1 X-Robots-Tag: noindex, nofollow, noimageindex X-Webkit-Csp: sandbox Content-Type: application/binary Accept-Encoding: identity,gzip Date: Tue, 15 Feb 2022 21:54:49 GMT Server: envoy Strict-Transport-Security: max-age=31536000; includeSubDomains; preload X-Robots-Tag: noindex, nofollow, noimageindex X-Dropbox-Response-Origin: far_remote X-Dropbox-Request-Id: 7daefabda8344260b029b47213fc8d53 Connection: close HTTP/1.1 206 Partial Content Accept-Ranges: bytes Cache-Control: max-age=60 Content-Disposition: attachment; filename="SelfExamCardInside.jpg"; filename*=UTF-8''SelfExamCardInside.jpg Content-Range: bytes 0-0/4006971 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Content-Security-Policy: sandbox Etag: 1627768410839975d Pragma: public Referrer-Policy: no-referrer Vary: Origin X-Content-Security-Policy: sandbox X-Content-Type-Options: nosniff X-Dropbox-Content-Length: 1 X-Robots-Tag: noindex, nofollow, noimageindex X-Webkit-Csp: sandbox Content-Type: application/binary Accept-Encoding: identity,gzip Date: Tue, 15 Feb 2022 21:54:17 GMT Server: envoy Strict-Transport-Security: max-age=31536000; includeSubDomains; preload X-Robots-Tag: noindex, nofollow, noimageindex X-Dropbox-Response-Origin: far_remote X-Dropbox-Request-Id: cdaf604d28c1485da9bff49ba955defc Transfer-Encoding: chunked HTTP/2 206 accept-ranges: bytes cache-control: max-age=60 content-disposition: attachment; filename="SelfExamCardInside.jpg"; filename*=UTF-8''SelfExamCardInside.jpg content-range: bytes 0-0/4006971 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< content-security-policy: sandbox etag: 1627768410839975d pragma: public referrer-policy: no-referrer vary: Origin x-content-security-policy: sandbox x-content-type-options: nosniff x-robots-tag: noindex, nofollow, noimageindex x-webkit-csp: sandbox content-type: application/binary accept-encoding: identity,gzip date: Tue, 15 Feb 2022 21:55:06 GMT server: envoy strict-transport-security: max-age=31536000; includeSubDomains; preload x-robots-tag: noindex, nofollow, noimageindex content-length: 1 x-dropbox-response-origin: far_remote x-dropbox-request-id: 2b03cfeb681d44da87abed089006e354
Just read and parse "content-range" header, instead "content-length" (the length is part of the range). 😉 This is cross protocol and cross site solution (will work not only for Dropbox). Just take care to ignore "content-length" here! It's obvious but, to mention: since it's a single byte range, the length (wherever you read it) will be fixed to 1 (as you can see above).
Add: Oh.. I forgot! mbvistaprint What file are you trying to check size on? To the picture that was send to you or to the preview page's HTML file?
mbvistaprintwrote:...
Content-Type: text/html; charset=utf-8
...
🤔 Take little bit more care! It's dynamic content and that's why there is not size in advance. Even if you where able to get something, it would be wrong for sure! It's just NOT the desired file. 🙂 Replace the ending "?dl=0" to "?dl=1" or "?raw=1". That's it. 😉 All above examples use "?dl=1" - all but the your.
Greg-DB
Dropbox Community Moderator
4 years agoTo elaborate a bit on some of what Здравко was saying, note that in order to temporarily accommodate clients that don’t properly support automatically handling “Transfer-Encoding: chunked”, we’re temporarily rolling back that change, so that these links will no longer use “Transfer-Encoding: chunked” and will instead return “Content-Length” on HTTP/1.1. We will begin rolling that out starting around 2/17. That will be in place until around 3/1. At that point, we will begin using “Transfer-Encoding: chunked” and no longer returning “Content-Length” on HTTP/1.1 again. So, in case that is the issue in your case, going forward, please ensure that your clients are able to automatically handle both chunked encoding and non-chunked encoding automatically.
- mbvistaprint4 years agoHelpful | Level 5
Thank you! I will be discussing with my boss this afternoon how we want to handle this and will let him know about the temporary reprieve on this. Appreciate the help!
-Melissa
- Greg-DB4 years ago
Dropbox Community Moderator
Update: the team has been able to complete some further updates to our infrastructure to be able to support the previous non-chunked behavior going forward indefinitely. That means that we plan to continue returning Content-Length (and not 'Transfer-Encoding: chunked') in the future and will not be reverting this as previously planned. (Regardless, for HTTP compatibility in general, we still recommend you make sure your HTTP clients support both types.) Hope this helps!
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!