How can I upload a file that I have in my Documents/Inbox directory using Alamofire?
There are many topics on this but they all cover uploading photos, which is not what I want. I would like to upload a zip file to my that uses PHP
Below is what I use to get the file's content, but I'm not sure if this is correct:
do {
let directoryContents = try FileManager.default.attributesOfItem(atPath: "\(NSHomeDirectory())/Documents/Inbox/file.zip")
let Contents = directoryContents
print("File is okay")
} catch let error as NSError {
print(error.localizedDescription)
}
Edit: I tried the Alamofire examples without success: (Please note that I am uploading a file that a user has submitted through the app via "Import to" rather than a file that is inside the xcode project.)