NSString *fileName=[NSString stringWithFormat:@"%@%,@%,%@",firstName,lastName,pateintID];
и
[body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"audio\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[fileName dataUsingEncoding:NSUTF8StringEncoding]];//file name is ur typed data
Аудио файл отправляется на сервер
[body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"userfile\"; filename=\".wav\"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[NSData dataWithData:AudioNSDataName]]; //AudioNSDataName is ur Audio NSData variable.
[body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];