cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Obj-C: Getting "over quota" error after session start for uploading chunks

Helpful | Level 6

Whenever an API call fails, I like to check to see if the user is over their usage quota, and if so, I throw up a warning that they need to delete some files or upgrade their Dropbox account. As Greg previously explained, I can do this using the route error passed into the response methods, e.g.:

 

 

DBFILESUploadError *routeError = ...

if (routeError.isPath && routeError.path.isInsufficientSpace)
    NSLog (@"Update your Dropbox account or tidy up!");

 

However, there seems to be no way to do this after calling DBFILESRoutes -uploadSessionStartData:, because the callback for this method does not return a route error. Instead, it provides a DBNilObject object where the route error would normally be. So how do I check for "over quota" (isInsuffientSpace) error in this case?

 

Can I check the statusCode of the DBError? (In API 1, a 507 indicated that you were out of space, for instance.)

 

Thanks and all the best,
Keith

2 Replies 2
Highlighted

Re: Obj-C: Getting "over quota" error after session start for uploading chunks

Dropboxer
Dropboxer

The start and append methods don't return space errors. Only the finish calls do, as that's when the final file size is known and checked against the available quota space when attempting to commit the file. 

Highlighted

Re: Obj-C: Getting "over quota" error after session start for uploading chunks

Helpful | Level 6

Ah, okay, makes sense. I was thinking that the chunks were being stored against the user's Dropbox quota so would throw the error too.

 

Thanks,

Keith

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?