Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello, I making android app with dropbox API and I have a problem. My app zips folder on android device and uploads it on dropbox, it works. If I download zip file from dropbox to my PC, I can extract it but if I download this file using dropbox api method getFile with code below, downloaded zip file is corrupted and archive showing error "end of central directory signature not found"
Here is the code:
protected Boolean doInBackground(Void... params) {
String inPath = Environment.getExternalStorageDirectory() + dropboxFile;
File file=new File(inPath);
FileOutputStream mFos = null;
try {
mFos = new FileOutputStream(file);
} catch (FileNotFoundException e){
return false;
}
try {
dbAPI.getFile("/" + dropboxFile, null, mFos, null);
} catch (DropboxException e) {
e.printStackTrace();
}
return true;
}
Can you help me please?
How are you downloading the file when it does work? Are you using the Dropbox web site? Can you compare the file you get that way to the file you get via the API? E.g., compare the file lengths and/or hashes.
Some other things that would be helpful in debugging this:
- the rest of the relevant code (e.g., what do you do with mFos?)
- any output/errors you get from the code
Thanks for your reply. I found solution to this, problem was in download progress because the file was not downloaded completely. I've done a few things around and now it works.
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!