Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #59 from MarcusSmith/master
Browse files Browse the repository at this point in the history
Fix File Upload Bug
  • Loading branch information
pvzig authored Nov 18, 2016
2 parents 7286626 + 788b4e4 commit cb542da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SlackKit/Sources/WebAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public final class WebAPI {
}

public func uploadFile(_ file: Data, filename: String, filetype: String = "auto", title: String? = nil, initialComment: String? = nil, channels: [String]? = nil, success: ((_ file: File)->Void)?, failure: FailureClosure?) {
let parameters: [String: Any?] = ["file": file, "filename": filename, "filetype": filetype, "title": title, "initial_comment": initialComment, "channels": channels?.joined(separator: ",")]
let parameters: [String: Any?] = ["filename": filename, "filetype": filetype, "title": title, "initial_comment": initialComment, "channels": channels?.joined(separator: ",")]
networkInterface.uploadRequest(token, data: file, parameters: WebAPI.filterNilParameters(parameters), successClosure: {
(response) -> Void in
success?(File(file: response["file"] as? [String: Any]))
Expand Down

0 comments on commit cb542da

Please sign in to comment.