Created
June 7, 2018 16:19
-
-
Save mansi-27/1d401430060c84b232e84a16bc17d7a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if FileManager.default.fileExists(atPath: fileURL.path) { | |
| do { | |
| let data = try Data(contentsOf: fileURL) | |
| /// Sweetie, this is the data you need to upload as the multipart form data | |
| /// via URLSession or Alamofire, Moya, whatever Network Library you're using! 🍻 | |
| } catch { | |
| print(error.localizedDescription) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment