之前上传过程中是没有任何问题的。今天突然出现这个问题:用七牛上传图片时,没有成功,确调用上传完毕的方法。如图:
这是我的方法实现:`+ (void)uploadImageToQNFilePath:(NSString )filePath AndToken:(NSString )token upSuccess:(void (^)(NSString ))success progressPercent:(void (^)(float, BOOL ))progresspercent iscancel:(void (^)(BOOL))CancelResult
{
_cancel = NO;
QNUploadManager *upManager = [[QNUploadManager alloc] init];
QNUploadOption *uploadOption = [[QNUploadOption alloc] initWithMime:nil progressHandler:^(NSString *key, float percent) {
if (progresspercent) {
progresspercent(percent,&_cancel);
}
// NSMutableDictionary *info = [NSMutableDictionary dictionary];
// info[YBSPicUploadProgress] = @(percent);
}params:nil
checkCrc:NO
cancellationSignal:^BOOL{
!_cancel ?: CancelResult(YES);
return _cancel;
}];
[upManager putFile:filePath key:nil token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) {
NSLog(@"info ===== %@", filePath);
NSLog(@"key ===== %@", key);
NSLog(@"resp ===== %@", resp);
if (success) {
success(resp[@"key"]);
}
}
option:uploadOption];
}`
完全没变啊...求助
J'ai trouvé le problème.... Il s'avère que l'arrière-plan m'a donné un caractère de nouvelle ligne n supplémentaire dans le jeton.... J'espère que tout le monde pourra en tirer des leçons. Je suis LZ