首頁  >  問答  >  主體

objective-c - OC語言 IOS上傳語音。

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)

這是為神馬

我想大声告诉你我想大声告诉你2748 天前604

全部回覆(0)我來回復

無回覆
  • 取消回覆