We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible/what is the best way to POST multiple files?
The text was updated successfully, but these errors were encountered:
The PUT example shows how to upload a file. Use the provided HTTPUpload object to upload files. All files to upload should be in a HTTPUpload object.
HTTPUpload
See https://github.com/daltoniam/SwiftHTTP#put for more info.
also a quick example based off that:
let fileUrl = NSURL.fileURLWithPath("/Users/dalton/Desktop/file")! let fileUrl2 = NSURL.fileURLWithPath("/Users/dalton/Desktop/file2")! var request = HTTPTask() request.PUT("http://domain.com/1", parameters: ["param": "hi", "something": "else", "key": "value","file": HTTPUpload(fileUrl: fileUrl!), "file2": HTTPUpload(fileUrl: fileUrl2!)], success: {(response: HTTPResponse) in //do stuff },failure: {(error: NSError, response: HTTPResponse?) in //error out on stuff })
Sorry, something went wrong.
No branches or pull requests
Is it possible/what is the best way to POST multiple files?
The text was updated successfully, but these errors were encountered: