Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
brtdvrs
3 years agoHelpful | Level 5
Download not complete with json file
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:
[Fiddler] ReadResponse() failed: The server did not return a complete response for this request. Server returned
3.261.611 bytes.
Other files in the same folder download without problem. Download from Dropbox site works fine, the JSON is validated ok.
What could be the problem ?
6 Replies
- Здравко3 years agoLegendary | Level 20
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.
- brtdvrs3 years agoHelpful | Level 5
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.
- Здравко3 years agoLegendary | Level 20
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. 🙋
- hashirshabbir3 years agoExplorer | Level 4
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.
- Здравко3 years agoLegendary | Level 20
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.
- mellisajhon3 years agoExplorer | Level 3
Здравко
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.
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!