objective c - Afnetworking 2.0 PUT image -


  1. i able use put method of afnetworking 2.0 putting data.

    nsstring* puturl = [nsstring stringwithformat:@"%@/updateestado/estado/%@/idjugador/%ld",baseurl,[status urlencodeusingencoding:nsutf8stringencoding],userid];

    nslog(@"reg url----%@",puturl);

    afhttprequestoperationmanager *manager = [afhttprequestoperationmanager manager]; [manager put:puturl parameters:nil success:^(afhttprequestoperation *operation, id responseobject) { nslog(@"json: %@", responseobject); [self.net_delegate delegateupdatestatusresponce:responseobject];

    } failure:^(afhttprequestoperation *operation, nserror *error) { [self.net_delegate delegateupdatestatuserror:error]; }];

    1. i able upload video using post method.
    2. but requirement uploading image using put enter image description here
    3. i followed way given in simple "put" file upload afnetworking had 2 issues says multipartformrequestwithmethod deprived & when trying approach 404 error.
    4. no reference on afnetworking doc in github.

    5. query: working on uploading image using put first time, think missing thing. reference or code samples achieve helpful. thanks

you not uploading image; rather url of image (note url parameter).

therefore need upload image 3rd party site , post link whatever service is.

it's impossible upload image using put request must missing something.


Comments