This repository was archived by the owner on Jan 28, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -134,12 +134,14 @@ public struct NetworkInterface {
134134 let boundaryEnd = " -- \( boundaryConstant) -- \r \n "
135135 let contentDispositionString = " Content-Disposition: form-data; name= \" file \" ; filename= \" \( filename) \" \r \n "
136136 let contentTypeString = " Content-Type: \( filetype) \r \n \r \n "
137+ let dataEnd = " \r \n "
137138
138139 guard
139140 let boundaryStartData = boundaryStart. data ( using: . utf8) ,
140141 let dispositionData = contentDispositionString. data ( using: . utf8) ,
141142 let contentTypeData = contentTypeString. data ( using: . utf8) ,
142- let boundaryEndData = boundaryEnd. data ( using: . utf8)
143+ let boundaryEndData = boundaryEnd. data ( using: . utf8) ,
144+ let dataEndData = dataEnd. data ( using: . utf8)
143145 else {
144146 errorClosure ( SlackError . clientNetworkError)
145147 return
@@ -150,6 +152,7 @@ public struct NetworkInterface {
150152 requestBodyData. append ( contentsOf: dispositionData)
151153 requestBodyData. append ( contentsOf: contentTypeData)
152154 requestBodyData. append ( contentsOf: data)
155+ requestBodyData. append ( contentsOf: dataEndData)
153156 requestBodyData. append ( contentsOf: boundaryEndData)
154157
155158 request. setValue ( contentType, forHTTPHeaderField: " Content-Type " )
You can’t perform that action at this time.
0 commit comments