Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
when I want to download a json file of 4,7MB the response is empty. I tried with the SDK using dbx.filesDownload({ path: file }) and with a HTTP request on 'https://content.dropboxapi.com/2/files/download'. In Fiddler I get the message:
@brtdvrs wrote:when I want to download a json file of 4,7MB the response is empty. ...
[Fiddler] ReadResponse() failed: The server did not return a complete response for this request. Server returned 3.261.611 bytes....
Hi @brtdvrs,
Do you understand that you contradict to yourself? It cannot be empty and contain something in the same time! Also, make distinction between Dropbox API/SDK response and other part/library in your application response (as seems you're messing them). Isolate and post some code snippet related to the download only (where eventually an issue appears).
Good luck.
this is the code:
dbx.filesDownload({ path: file })
.then(async function (response) {
let reader = new FileReader();
reader.readAsText(response.result.fileBlob);
await new Promise(resolve => reader.onload = () => resolve());
let griddata = JSON.parse(reader.result);
FlexgridOrderFunctions(griddata, GridName);
})
.catch(function (error) {
alert(error);
});
the result here is empty, but in Fiddler I got the message above. I catch no error.
You can dump 'response.status' and 'response.headers' (most interesting is "dropbox-api-result" header, if any) to see what's going on (as a first step of course).
Add: Why you need to construct new Promise at all?! Why don't you use the 'onload's body to perform rest of the work? 🤷 Would be more simple and stable (last but not least: it's the native way it works). Otherwise use the Blob's 'text' method. 🙋
The issue of an empty response when attempting to download a 4.7MB JSON file from Dropbox via both the SDK and an HTTP request, as well as the Fiddler error message indicating an incomplete server response of 3.261.611 bytes, suggests a potential problem with the server's response or network connectivity during the download process.
Since other files in the same folder download without any issues and downloading from the Dropbox website works fine, it's possible that there might be a specific issue with this particular file's accessibility or format on the server side. Further investigation into the server's response and the specific file's settings in Dropbox may be necessary to pinpoint the exact problem.
@hashirshabbir wrote:..., it's possible that there might be a specific issue with this particular file's accessibility or format on the server side. ...
No @hashirshabbir. All files, in perspective of API/SDK, are like "black boxes". The only difference is these "boxes" size. In particular case, the size is too small (much less than 150MB) size to matters.
Здравко
I also face the same issue.When I upload my Webite names cluster article into Dropbox, I face same issues some times. but since last month, it is okay.
Hi there!
If you need more help you can view your support options (expected response time for a 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!