objective-c - OC語言 IOS上傳語音。
我想大声告诉你
我想大声告诉你 2017-05-02 09:28:57
0
0
617

OC語言
呼叫這個方法

[upManager putData:data key:strMp3 token:self.qiNiuTokenStr

              complete: ^(QNResponseInfo *info, NSString *key, NSDictionary *resp) {

                  NSLog(@"%@", info);

                  NSLog(@"%@", resp);


  } option:nil];

獲得了這個值

2016-08-22 10:45:48.351 FanHeIOS2.0[22106:3864544] {

    hash = Fj3F3KQUY6fDTKj1DDmytuzrKu7M;

    key = "/Users/renhao/Library/Developer/CoreSimulator/Devices/ABBDC6C2-F398-40DE-BC7E-158F61075E2F/data/Containers/Data/Applicat ... cord.mp3";

}

我現在做到這一步,在呼叫這個方法嗎

[upManager putFile:resp[@"key"] key:resp[@"key"] token:self.qiNiuTokenStr complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) {

                      NSLog(@"info ===== %@", info);

                      NSLog(@"resp ===== %@", resp);

                  } option:uploadOption];


              } option:nil];

呼叫這個方法報錯

2016-08-22 10:45:55.683 FanHeIOS2.0[22106:3864544] info ===== <QNResponseInfo= id: A9EE6215-2A96-45E4-9175-663CABEDDDFF, ver: 7.0.19, status: -4, requestId: (null), xlog: (null), xvia: (null), host: (null) ip: (null) duration: 0.000000 s time: 1471833955 error: Error Domain=NSCocoaErrorDomain Code=260 "The file “Applicat ... cord.mp3” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/renhao/Library/Developer/CoreSimulator/Devices/ABBDC6C2-F398-40DE-BC7E-158F61075E2F/data/Containers/Data/Applicat ... cord.mp3, NSUnderlyingError=0x7fee1b5efcf0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}>

2016-08-22 10:45:59.771 FanHeIOS2.0[22106:3864544] resp ===== (null)

這是為神馬

我想大声告诉你
我想大声告诉你

全部回覆(0)
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板