我正在使用以下代码上传多个音频文件
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager 管理器];
[manager POST:requestUrl parameters:jsonParameter constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
//add audio data one by one
for(int i=0; i<[pathArr count];i++)
{
AudioFile *audiofile = [pathArr objectAtIndex:i];
NSData *audioData = [[NSFileManager defaultManager] contentsAtPath:audiofile.filePath];
NSString *strName = [[pathArr objectAtIndex:i] lastPathComponent];
[formData appendPartWithFormData:audioData name:strName];
}
} success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"Success: %@", responseObject);
[self.delegate uploadingFileResponseReceieved:responseObject];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
但现在我还想为每个音频文件发送文件名、文件大小和文件创建日期参数。我怎样才能做到这一点?