本文介绍了如何将音频文件从iphone文件夹上传到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在录制语音并将其保存到iphone文档文件夹中,但我希望它上传到服务器,那么该怎么做?
I am recording the voice and saving it into iphone document folder but I want it to upload to the server, so how to do this?
NSString * path = [NSString stringWithFormat:@"%@/Documents/%@_%@_%@_%@.wav", NSHomeDirectory(), patient.firstName, patient.lastName, patient.transactionId, type];
其中path为asset.path
Where path is asset.path
if (assetIndex < ([assets count]-1)) {
while (assetIndex < ([assets count]-1)) {
assetIndex += 1;
Asset *asset = [assets objectAtIndex:assetIndex];
NSData *data = [NSData dataWithContentsOfFile:asset.path];
}
推荐答案
这篇关于如何将音频文件从iphone文件夹上传到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!