専用サーバーに音声ファイルをアップロードしたいのですが、そのために
次のコードを使用しています
NSURL *audiourl = [NSURL URLWithString:@"my Url"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:audiourl];
NSData *postData = [NSData dataWithContentsOfURL:url];
//url is my audio url path of NSDocumentDirectory.
[request addData:postData withFileName:@"myAudio.caf" andContentType:@"audio/caf" forKey:@"company_audio"];
[request setDelegate:self];
[request startSynchronous];
次のようにパスを提供するコンソールにURLを出力します。
url:file://localhost/Users/User/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/013AE2E8-C410-4544-A426-D0706BC0A13A/Documents/myaudio.caf
しかし、サーバーに自分のオーディオ ファイルが表示されません。
私のコードの問題は何ですか?
どんな助けもかなりのものです。
事前に感謝します...