Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

Getty I.'s avatar
Getty I.
New member | Level 1
9 years ago

SaveUrl no longer detects dropbox full

Hello,

The SaveUrlAsync behavior has changed recently such that it no longer thows a SaveUrlError exception when a user's dropbox is full.   Why was this changed?  We were relying on this to detect that the user's dropbox is full.

Thank You,

 

Larry

 

7 Replies

  • Getty I.'s avatar
    Getty I.
    New member | Level 1
    9 years ago

    Actually, this just worked for me but it's inconsistent.  It does not always throw the SaveUrlError.   Do you know why I don't always get s SaveUrlError when calling SaveUrlAsync and when the user's dropbox is full?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    Hi Larry, I just tried this out on an account that is over quota and it does seem to be giving me the error consistently.

    When you see this work not as expected, are you seeing the save operation succeed? If so, how/when were you checking the quota such that you expected the operation to fail? Any other steps/details you can offer to help us reproduce this would be helpful. Thanks in advance! 

  • Getty I.'s avatar
    Getty I.
    New member | Level 1
    9 years ago

    Hi Gregory, Thank you for getting back to me.  What I've noticed is that, if I call SaveUrlAsync in a loop, each call provides me with a job id instead of throwing an exception.  In each call to SaveUrlAsync, we are uploading a different file.  However, when I just make one call on it's own, SaveUrlAsync will throw the ApiException as expected and which contains the error telling us the that dropbox is full.

    Thank You,

     

    Larry

     

     

    Here is a sample code snippet:  

    using (var dbx = new DropboxClient(accessToken))
    {
    try
    {
    var response = await dbx.Files.SaveUrlAsync(file, url );
    var jobId = response.AsAsyncJobId.Value;
    return new SaveUrlResponse {async_job_id = jobId};
    }
    catch (ApiException<SaveUrlError> ex)
    {
    }

    }

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    Thanks for the additional information Larry. Is the looped version of your code any different than the above, beyond directly placing it in a for loop?

    Also, if you could let me know how/when you're checking the space usage such that you expect it to fail, that would be useful. (Users may always be changing things in their accounts, which can put them over or under their quota usage at any point in time.) Is it happening for specific users in particular? Thanks in advance! 

  • Getty I.'s avatar
    Getty I.
    New member | Level 1
    9 years ago

    Hi,

    You are right.  The looped version is the same code above that calls the sdk, but wrapped in a for loop.  To test the functionality, I have a dropbox account that I have filled up.  I'm using the access token of that dropbox account.  If I call https://api.dropboxapi.com/2/files/save_url I get the appropriate error response of insufficient space.  So, we know for sure that the account is full.

    Also, a little more information.  When saveurlasync doesn't throw a saveurl error, it gives me a job id. When I check the status of the job id, I do get the appropriate error.   It's just that the initial saveurlasync call isn't throwing the ApiException.  

     

    Thank You.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    Thanks! I still can't seem to reproduce this though. Please open an API ticket with the account ID and the output you're getting so we can look into it specifically. 

About Dropbox API Support and Feedback

Node avatar for 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!