Hi,
I'm implementing Dropbox in my latest app. The app needs to do upload, share files and retrieve the shared links.
This is done the following way.
1. The app checks if the file is previously uploaded by id
2. The app checks if the id has shared link and if id doesn't goes to step 4
3. The app requests links and then enumerates to find if there is one suitabe. If it's found then the link can be used and all is fine.
4. If there is no shared link the app requests sharing with needed permissions and takes the desired link from the response so the job is finished.
5. If there is no uploaded file with the given id the app makes an upload request and then goes to step 4 as obviously there won't be any shared link.
All of this is working fine.
In the app this can be done for a signle file or for multiple files and then I need to have a way to cancel the requests for some or all of the files. I have my own scheme how to do this but I need to store the currently active (processing) requst in a class var so later I can just call cancel() on it but I'm reaaly confused how to do it. I simply can't understand and can't find the declaration type of that var.
I tried Alamofire.Requst and many other types but really can't figure it out.
The documentation is so confusing and badly organised that is not much of a help. So here is my last chance to find some guidances.
Thanks