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 context, we have customers using our API that use Drop Box to share files with our print service but as of Wednesday this past week the links are no longer working for our service. We're unable to confirm the file size from the shared link. Nothing changed on our customer's side with their sharing and many of these files have been shared with us for years. Other shared files (from Shopify for example) still work with our service so this seems specific to the DropBox shared files. Any ideas what may have changed to cause this?
Thanks!
-Melissa
29 Replies
Replies have been turned off for this discussion
- Greg-DB4 years ago
Dropbox Community Moderator
mbvistaprint That does not appear to be a response from Dropbox itself. Can you share a sample value of the "url" variable that would be used in your code?
- mbvistaprint4 years agoHelpful | Level 5
Sorry about that... So here's a working HEAD request that returns 200 for us with another Shared Image File:
- Request Headers:
- Accept:"*/*"
- cache-control:"no-cache"
- User-Agent:"PostmanRuntime/7.6.0"
- Host:"upload.wikimedia.org"
- accept-encoding:"gzip, deflate"
- content-length:""
- Request Headers:
- Response Headers:
- Date:"Mon, 14 Feb 2022 19:56:24 GMT"
- Content-Type:"image/gif"
- Content-Length:"1789"
- X-Object-Meta-Sha1Base36:"j46h21owxa5nvjxzmreodh4vr4rw2a7"
- Last-Modified:"Sun, 06 Oct 2013 15:18:28 GMT"
- Etag:"792456dc6ed5053432e53ea1aaa2a444"
- X-Timestamp:"1381072707.29367"
- Server:"ATS/8.0.8"
- Age:"105"
- X-Cache:"cp1082 miss, cp1086 hit/1"
- X-Cache-Status:"hit-front"
- Server-Timing:"cache;desc="hit-front", host;desc="cp1086""
- Strict-Transport-Security:"max-age=106384710; includeSubDomains; preload"
- Report-To:"{ "group": "wm_nel", "max_age": 86400, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] }"
- NEL:"{ "report_to": "wm_nel", "max_age": 86400, "failure_fraction": 0.05, "success_fraction": 0.0}"
- Permissions-Policy:"interest-cohort=()"
- X-Client-IP:"72.38.236.99"
- Access-Control-Allow-Origin:"*"
- Access-Control-Expose-Headers:"Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache"
- Timing-Allow-Origin:"*"
- Accept-Ranges:"bytes"
- Connection:"keep-alive"
And here's what we're getting with the same request to dropbox:
PrettyRaw- Request Headers:
- Accept:"*/*"
- cache-control:"no-cache"
- User-Agent:"PostmanRuntime/7.6.0"
- Host:"www.dropbox.com"
- cookie:"t=VJO2c4CRFqZizRnH5eTAtdBa; locale=en; gvc=MjQyOTU1MzM4NDQ2MzQzNzgzNjAzMTEwODgzMDY2OTExMDM0NTE5; __Host-js_csrf=VJO2c4CRFqZizRnH5eTAtdBa"
- accept-encoding:"gzip, deflate"
- content-length:""
- Response Headers:
- Cache-Control:"no-cache,no-cache, no-store"
- Content-Security-Policy:"base-uri 'self' ; child-src https://www.dropbox.com/static/serviceworker/ blob: ; connect-src https://* ws://127.0.0.1:*/ws ; default-src https://www.dropbox.com/playlist/ https://www.dropbox.com/v/s/playlist/ https://*.dropboxusercontent.com/p/hls_master_playlist/ https://*.dropboxusercontent.com/p/hls_playlist/ ; font-src https://* data: ; form-action 'self' https://www.dropbox.com/ https://dl-web.dropbox.com/ https://photos.dropbox.com/ https://paper.dropbox.com/ https://showcase.dropbox.com/ https://www.hellofax.com/ https://app.hellofax.com/ https://www.hellosign.com/ https://app.hellosign.com/ https://docsend.com/ https://www.docsend.com/ https://help.dropbox.com/ https://navi.dropbox.jp/ https://selfguidedlearning.dropboxbusiness.com/ https://instructorledlearning.dropboxbusiness.com/ https://sales.dropboxbusiness.com/ https://dropboxconnect.co.uk/ https://accounts.google.com/ https://api.login.yahoo.com/ https://login.yahoo.com/ https://experience.dropbox.com/ https://pal-test.adyen.com https://2e83413d8036243b-Dropbox-pal-live.adyenpayments.com/ ; frame-src https://* carousel: dbapi-6: dbapi-7: dbapi-8: dropbox-client: itms-apps: itms-appss: ; img-src https://* data: blob: ; media-src https://* blob: ; object-src 'self' https://cfl.dropboxstatic.com/static/ https://www.dropboxstatic.com/static/ ; report-uri https://www.dropbox.com/csp_log?policy_name=metaserver-whitelist ; script-src 'unsafe-eval' https://www.dropbox.com/static/api/ https://www.dropbox.com/page_success/ https://cfl.dropboxstatic.com/static/js/ https://www.dropboxstatic.com/static/js/ https://cfl.dropboxstatic.com/static/src/dws-ensemble-appshell/ https://www.dropboxstatic.com/static/src/dws-ensemble-appshell/ https://cfl.dropboxstatic.com/static/previews/ https://www.dropboxstatic.com/static/previews/ https://cfl.dropboxstatic.com/static/api/ https://www.dropboxstatic.com/static/api/ https://cfl.dropboxstatic.com/static/cms/ https://www.dropboxstatic.com/static/cms/ https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ 'unsafe-inline' ; style-src https://* 'unsafe-inline' 'unsafe-eval' ; worker-src https://www.dropbox.com/static/serviceworker/ blob:"
- Referrer-Policy:"strict-origin-when-cross-origin"
- Set-Cookie:"__Host-logged-out-session=ChDNFjzU5Y3hv+wpzLJmOiR8ELTpqpAGGi5BQ2NhMWdvc01HbXBJZ3JrcmZUempOT1c4RU54dUR3RE80TzF0U0VSMXdrYUNR; HttpOnly; Path=/; Secure"
- X-Content-Type-Options:"nosniff"
- X-Frame-Options:"DENY"
- X-Permitted-Cross-Domain-Policies:"none"
- X-Robots-Tag:"noindex, nofollow, noimageindex"
- X-Xss-Protection:"1; mode=block"
- Content-Type:"text/html; charset=utf-8"
- Accept-Encoding:"identity,gzip"
- Date:"Mon, 14 Feb 2022 19:59:48 GMT"
- Server:"envoy"
- Strict-Transport-Security:
- 0:"max-age=31536000; includeSubDomains"
- 1:"max-age=31536000; includeSubDomains"
- 2:"max-age=31536000; includeSubDomains; preload"
- Content-Encoding:"gzip"
- Vary:"Accept-Encoding"
- X-Dropbox-Response-Origin:"far_remote"
- X-Dropbox-Request-Id:"3a7e948775e741d4a99ff8e892df2668"
- Transfer-Encoding:"chunked"
Or with DL=1 (no response):
PrettyRawHEAD /s/6djz4es56yb5k1b/SelfExamCardInside.jpgAccept: */*cache-control: no-cache - Здравко4 years agoLegendary | Level 20
Hi mbvistaprint,
Hah... 😁 One more bug... 🤷 It's definitely not the same like the one I linked to before.
Here as far as I can see Dropbox server gets confused from Accept-Encoding header. You haven't posted you query, but most probably there your web client pushed all supported encodings. What seems confusing to Dropbox (I have no idea why - just bug). Let's hope that will get solved soon.
You can workaround (temporary, at least) by putting within your request a header like:
Accept-Encoding: identity
That's it. 😉
Good luck.
Greg-DB, I have no idea what's going on, but such bugs are "raining" one after other!? Maybe it's asking better QA... 🧐
Edit: mbvistaprint my error. You have posted it. And as expected:
mbvistaprint wrote:
...- accept-encoding:"gzip, deflate"
...Force replace it! 😉
- mbvistaprint4 years agoHelpful | Level 5
Thank you Здравко
That definitely got us something. 🙂 So using the identity encoding with the dl=1 url we get back a response at least. However, I'm still not seeing any "content-length"... It's just empty.... though I do see a "X-Dropbox-Content-Length: 4006971" which looks like it's probably the right value... it's just being provided in the way we're expecting.
HEAD /s/6djz4es56yb5k1b/SelfExamCardInside.jpgAccept: */*Accept-Encoding: identitycache-control: no-cacheUser-Agent: PostmanRuntime/7.6.0cookie: t=VJO2c4CRFqZizRnH5eTAtdBa; locale=en; gvc=MjQyOTU1MzM4NDQ2MzQzNzgzNjAzMTEwODgzMDY2OTExMDM0NTE5; __Host-js_csrf=VJO2c4CRFqZizRnH5eTAtdBa; __Host-logged-out-session=ChDNFjzU5Y3hv+wpzLJmOiR8ELTpqpAGGi5BQ2NhMWdvc01HbXBJZ3JrcmZUempOT1c4RU54dUR3RE80TzF0U0VSMXdrYUNRcontent-length:HTTP/1.1 200status: 200Accept-Ranges: bytesCache-Control: max-age=60Content-Disposition: attachment; filename="SelfExamCardInside.jpg"; filename*=UTF-8''SelfExamCardInside.jpgContent-Security-Policy: sandboxEtag: 1627768410839975dPragma: publicReferrer-Policy: no-referrerVary: Origin, Accept-EncodingX-Content-Security-Policy: sandboxX-Content-Type-Options: nosniffX-Dropbox-Content-Length: 4006971X-Robots-Tag: noindex, nofollow, noimageindexX-Robots-Tag: noindex, nofollow, noimageindexX-Server-Response-Time: 21X-Webkit-Csp: sandboxContent-Type: application/jsonAccept-Encoding: identity,gzipDate: Mon, 14 Feb 2022 21:32:54 GMTServer: envoyStrict-Transport-Security: max-age=31536000; includeSubDomains; preloadX-Dropbox-Response-Origin: far_remoteX-Dropbox-Request-Id: 0ae641141a2b4668a508979c25c6bd29Transfer-Encoding: chunked-Melissa - Greg-DB4 years ago
Dropbox Community Moderator
mbvistaprint You mentioned both "dl=0" and "dl=1". For clarity, which one are you actually using in your app? For reference, using "dl=0" would only give you the HTML preview page, not the actual file, so that's presumably not what you want. Using "dl=1" would give you the actual file, but would require the client follow one or more redirects first.
It's not clear why you're not getting a response though, and I can't reproduce that. I just tried a HEAD request on your sample link with "dl=1" sending the same request headers you specified for that one and I do get the expected redirects and successful response (that is, a 301, then a 302, then a 200).
- Здравко4 years agoLegendary | Level 20
Greg-DB wrote:... I just tried a HEAD request on your sample link with "dl=1" sending the same request headers you specified for that one and I do get the expected redirects and successful response (that is, a 301, then a 302, then a 200).
Hmm... 🤔 And what about the "content-length" with "the same request headers"? Take a look! Repeat again without gzip. 🙂
- mbvistaprint4 years agoHelpful | Level 5
Hi,
When I test this in Postman I can only get a response when adding the "Accept-Encoding: Identity" parameter. But even still I don't get a content-length returned.
-Melissa
- Здравко4 years agoLegendary | Level 20
Hmm... In such a case I'm up to here. In my test when transfer encoding is off (i.e. set to Identity) "content-length" comes up:
x-content-security-policy: sandbox x-content-type-options: nosniff x-robots-tag: noindex, nofollow, noimageindex x-server-response-time: 46 x-webkit-csp: sandbox content-type: application/json accept-encoding: identity,gzip date: Mon, 14 Feb 2022 22:19:20 GMT server: envoy strict-transport-security: max-age=31536000; includeSubDomains; preload x-robots-tag: noindex, nofollow, noimageindex content-length: 4006971 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< x-dropbox-response-origin: far_remote x-dropbox-request-id: 6be667e7c1b0467f85be55d383b06557
Just a subset of the response.
- Greg-DB4 years ago
Dropbox Community Moderator
Здравко Thanks. Just to clarify, I was referring to this portion in particular, which didn't indicate any of that:
mbvistaprint wrote:
PrettyRawHEAD /s/6djz4es56yb5k1b/SelfExamCardInside.jpgAccept: */*cache-control: no-cache - Greg-DB4 years ago
Dropbox Community Moderator
mbvistaprint Please note that using Postman may not accurately represent what your actual app itself is doing. For instance, it may be using a different version of HTTP itself (the Dropbox servers support both HTTP 1.1 and 2), etc. In any case, we can't provide support for Postman itself, so in case Postman is introducing any complications, please post the full raw HTTP request and response, where applicable for whatever exactly is causing issues for your app. For example, using curl may be more direct.
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!