NSDictionary *dic = @{@"x:userid" :USERID_String,
@"x:username" :[AppDelegate userName],
@"x:caseguid" :obj.barcode,
@"x:itemid" :[NSString stringWithFormat:@"%d",[[fileDic objectForKey:@"selectedIndex"] intValue]+1],
@"x:barcode" :obj.barcode,
@"x:filename" :fileReName,
@"x:fileremark":@" ",
@"x:filetype" :i2s(fileType),
@"x:usertoken" :[AppDelegate userToken],
@"x:patdetail" :json,
@"x:identify" :@"0",
@"x:picguid" :fileReName
};
NSLog(@"dic : %@",dic);
NSString *filePath = [m_AppDelegate.documentPath stringByAppendingPathComponent:[[fileDic objectForKey:@"video"] lastPathComponent] ];
QNUploadManager * up = [QNUploadManager sharedInstanceWithRecorder:nil recorderKeyGenerator:nil];
QNUploadOption *option = [[QNUploadOption alloc ]initWithMime:nil progressHandler:^(NSString *key, float percent) {
NSLog(@"key:%@ percent %f",key,percent);
} params:dic checkCrc:YES cancellationSignal:nil];
[up putFile:filePath key:fileReName token:qiniuToken complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) {
NSLog(@"info %@ key %@ resp %@",info,key,resp);
//NSLog(@"完成");
} option:option];
}];
请求回调
2014-12-23 11:09:46.572 zhenlipain[433:118722] key:3688_3C33D180-9E61-4D54-875E-33767F60D9AF_0E9ED74C-CA38-4B9E-BD69-AF84BB9A21F8.jpg percent 0.950000
2014-12-23 11:09:46.973 zhenlipain[433:118722] info <QNResponseInfo: 0x18118520, status: 401, requestId: KWEAAHyDAxujYbIT, xlog: UP/401, error: Error Domain=qiniu.com Code=401 "The operation couldn’t be completed. (qiniu.com error 401.)" UserInfo=0x18110520 {error=bad auth}> key 3688_3C33D180-9E61-4D54-875E-33767F60D9AF_0E9ED74C-CA38-4B9E-BD69-AF84BB9A21F8.jpg resp (null)
问题已经定位 是 自定义变量出现空字符串,造成出现//路径,nginx 前端做了一次跳转 变成了 /, 然后出现了失败,现在已经修正,请更新sdk 到7.0.7 版本