Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Bhupesh K.
9 years agoNew member | Level 1
Migration from Sync API v1 to Core API v2
Hi
I am migrating my existing code from Sync API v1 to Core API v2. There is one issue I am facing. There was a call in Sync API v2 to check if the cached file is latest or not:
DbxFile mFile...
Bhupesh K.
9 years agoNew member | Level 1
Hi
I am facing another issue while uploading a file on Dropbox. I have written code below for uploading a file.
InputStream inputStream = null;
FileMetadata obj = null;
try {
inputStream = new FileInputStream(srcFile);
obj = mDbxClient.files().uploadBuilder(remoteFolderPath + "/" + remoteFileName)
.withMode(WriteMode.OVERWRITE)
.uploadAndFinish(inputStream);
} catch (DbxException | IOException e) {
obj = null;
mException = e;
} finally {
if (inputStream != null)
try {
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
This code returns a NetworkIOException when Internet is off. While uploading a file with Internet off, Sync API v1 never threw any exception. When Internet was turned on, it automatically uploaded the file. Can I have such behaviour with Core API v2 also? How can I implement this?
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!