We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
wolfgangmeyers
2 years agoHelpful | Level 5
409 error when attempting to download image files
This was working perfectly fine a few days ago when I was testing integration with aibrush.art. Now when my app makes requests for any files ending in .webp or .png, a 409 response is returned with n...
- 2 years ago
Well, it has mysteriously stopped happening since I reported it. Someone must have caught the bug and fixed it 🙂
Greg-DB
Dropbox Staff
I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:
- the name and version number of the platform and SDK/library you are using, if any
- the steps to reproduce the issue, including relevant code snippet(s)
- the full text of any error or unexpected output, ideally including any/all headers and bodies for both request and response
Please be sure to redact any sensitive values, such as any access tokens or refresh tokens.
wolfgangmeyers
2 years agoHelpful | Level 5
Thanks for the help!
I'm using the "dropbox" npm package version 10.34.0.
Here's a code snippet that shows the `Dropbox` instance being used to download the image file:
const imageFileName = `image_filename.png`;
const imageResult = (await this.dropbox.filesDownload({
path: `/${imageFileName}`,
})).result;
For more context, here is a link to the place in my codebase that has the problem: https://github.com/wolfgangmeyers/aibrush-2/blob/main/src/lib/dropbox.ts#L167
Request Headers:
Response Headers:
If I change the file name to end in "_png" instead of ".png" and then download it, I get a 200 response and it downloads fine. Same happens with .webp files. The .json files that I'm using to store image metadata download without any issues.
For more context, here is a link to the place in my codebase that has the problem: https://github.com/wolfgangmeyers/aibrush-2/blob/main/src/lib/dropbox.ts#L167
Request Headers:
POST /2/files/download HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en,en-US;q=0.9
Authorization: Bearer <redacted>
Connection: keep-alive
Content-Length: 0
Dropbox-API-Arg: {"path":"/0d433c25-8365-4933-a96f-6f07543a899f.png}"}
Host: content.dropboxapi.com
Origin: http://localhost:3001
Referer: http://localhost:3001/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
sec-ch-ua: "Google Chrome";v="113", "Chromium";v="113", "Not-A.Brand";v="24"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Linux"
Response Headers:
HTTP/1.1 409 Conflict
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Accept-Ranges, Content-Range, ETag, Dropbox-API-Result
Cache-Control: no-cache
Content-Security-Policy: sandbox allow-forms allow-scripts
X-Content-Type-Options: nosniff
Content-Type: application/json
Accept-Encoding: identity,gzip
Date: Mon, 31 Jul 2023 16:55:48 GMT
Server: envoy
Content-Length: 97
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Robots-Tag: noindex, nofollow, noimageindex
X-Dropbox-Response-Origin: far_remote
X-Dropbox-Request-Id: 05ee6d257ece4f0e849a94b9d15d4fa3
If I change the file name to end in "_png" instead of ".png" and then download it, I get a 200 response and it downloads fine. Same happens with .webp files. The .json files that I'm using to store image metadata download without any issues.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 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!