2012-11-27 302 views
1

如何通過HTTP POST發送圖像數據?通過HTTP POST發送圖像數據

我有以下代碼:要做到這一點是通過做多圖片上傳但是這不會是JSON格式

NSURL *aUrl = [NSURL URLWithString:@"http://demo25.projectproofonline.com/soul_mate_modified/save.php"]; 
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:aUrl 
cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; 
[request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]]; 
[request setHTTPMethod:@"POST"]; 
[NSURLConnection connectionWithRequest:request delegate:self]; 

回答