0
我正嘗試將圖像和文檔上傳到遠程服務器。遠程服務器有處理上傳的PHP頁面。請求發送成功,但沒有到達服務器。我正在使用ASIHTTPREQUEST。這裏是代碼:沒有數據到達服務器
-(void)uploadFile
{
NSString *resume [email protected]"0";
NSUserDefaults *userCredentials =[NSUserDefaults standardUserDefaults];
NSString *userName =[userCredentials objectForKey:@"userName"];
NSLog(@"Media Type : %@",selectedMediaType);
NSLog(@"User Name : %@",[userCredentials objectForKey:@"userName"]);
NSLog(@"File Name : %@",delegate.fileName);
NSString *stringToAppend =[NSString stringWithFormat:@"mediatype=%@&file_name=%@&usrname=%@&filesize=%@&sha256sum=%@&resume=%@",selectedMediaType,delegate.fileName,userName,fileSize,fileSHA256Sum,resume];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://briareos.code20.com/putmedia.php?%@",stringToAppend ]];
uploadMedia = [ASIHTTPRequest requestWithURL:url];
NSLog(@"URL WITH INFO %@",url);
[uploadMedia appendPostData:dataToUpload];
[uploadMedia setDelegate:self];
[uploadMedia setRequestMethod:@"PUT"];
[uploadMedia startAsynchronous];
}
有人可以讓我知道可能是什麼問題?
沒有錯誤。 –