How to upload a run to a Strava athlete's profile using Alamofire
问题 I'm trying to add functionality into an app that would allow a user to upload runs to their Strava profile. Currently the runs are stored in the Documents directory of the app as gpx files, and although I know how to access them, I'm having trouble with the syntax of the Alamofire request. My code looks like this: func getDocumentsDirectory() -> URL { let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask) let documentsDirectory = paths[0] do { let fileURLs = try