Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.

Forum Discussion

larschassing's avatar
larschassing
Helpful | Level 6
9 years ago
Solved

SwiftyDropbox calling upload N times

If I call upload N times, the calls return immediately, but will SwiftyDropbox create N simultaneous uploads or queue the uploads and upload one after another?

  • SwiftyDropbox uses Alamofire, and Alamofire should behave like NSURLSession, meaning it will not queue up the requests for you.

    So if you make 10 requests in a row, the will likely timeout if they are long requests.
    You can solve this by dispatching your requests to a queue, and maxing out the number of concurrent operations to something like 2 or 3, or whatever makes sense for your app.

1 Reply

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    SwiftyDropbox uses Alamofire, and Alamofire should behave like NSURLSession, meaning it will not queue up the requests for you.

    So if you make 10 requests in a row, the will likely timeout if they are long requests.
    You can solve this by dispatching your requests to a queue, and maxing out the number of concurrent operations to something like 2 or 3, or whatever makes sense for your app.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,039 PostsLatest Activity: 3 hours ago
415 Following

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 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!