cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

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: 

SwiftyDropbox calling upload N times

SwiftyDropbox calling upload N times

larschassing
Helpful | Level 6
Go to solution

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?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
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.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution
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.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?