Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Naga Abhinaya T
9 years agoExplorer | Level 4
User Space Over Quota Exception
Hi, I am developing an app with Dropbox APIs. I am using dropbox-core-sdk-1.8.2.jar currently. What exception is thrown if the user space quota gets over? How can I keep track of the user quota? ...
Greg-DB
Dropbox Community Moderator
9 years agoThe Java SDK v1.8.2 is for API v1, which is deprecated:
https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/
You should instead use the latest version, which uses API v2:
https://www.dropbox.com/developers/documentation/java
When using that, if you try to upload to an account that's currently over quota, you'll get an UploadErrorException indicating the issue. Specifically, it will have an UploadError.path with a WriteError.isInsufficientSpace.
In code, that means you can do something like this:
} catch (UploadErrorException ex) {
System.err.println("Error uploading to Dropbox: " + ex.getMessage());
if (ex.errorValue.isPath()) {
if (ex.errorValue.getPathValue().getReason().isInsufficientSpace()) {
System.err.println("Couldn't upload because the account has insufficient space.");
}
}
To check the available space, you can use getSpaceUsage. The returned values are documented in SpaceUsage.
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!