I am using Swift-SRWebClient to upload multiple images in single post but i am not able to do so with swift 2.2? using REST API -
here code :
srwebclient.post("http://www.tiikoni.com/tis/upload/upload.php").data(messagedata, fieldname:"photo", data: ["createdby":"4","name": "test", "description" :"test","categoryid": "0", "sendtosupplier":"0","deliverydate":"25/10/2016","fileextension":"png"]) .send({(response:anyobject!, status:int) -> void in // process success response },failure:{(error:nserror!) -> void in // process failure response })
this method gives me error
cannot invoke argument list of type .....
srwebclient.post("your url/m/api").data(yorarrayofimagedata, fieldname:"photo", data: [ "createdby":"4", "name": "test", "description" :"test", "categoryid": "0", "parameters":"0", "deliverydate":"25/10/2016", "fileextension":"png" ]) .send({(response:anyobject!, status:int) -> void in print("success") self.navigationcontroller?.popfadetorootviewcontroller() }, failure: {(error:nserror!) -> void in print("failure") } )
Comments
Post a Comment