Commit 7839ad725ccd5a897a055a82bb87beed25ef6510
1 parent
f3b1687e
七牛上传取消
Showing
2 changed files
with
13 additions
and
5 deletions
CNLiveUploadManager.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveUploadManager' | 10 | s.name = 'CNLiveUploadManager' |
| 11 | - s.version = '0.1.24' | 11 | + s.version = '0.1.25' |
| 12 | s.summary = '压缩上传,组件化中加入新参数加入outPath,不在直接取' | 12 | s.summary = '压缩上传,组件化中加入新参数加入outPath,不在直接取' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveUploadManager/Classes/CNLiveUploadManager.m
| @@ -247,7 +247,9 @@ static CNLiveUploadManager *_uploadManager; | @@ -247,7 +247,9 @@ static CNLiveUploadManager *_uploadManager; | ||
| 247 | QNUploadOption *opt = [[QNUploadOption alloc] initWithMime:nil progressHandler:^(NSString *key, float percent) { | 247 | QNUploadOption *opt = [[QNUploadOption alloc] initWithMime:nil progressHandler:^(NSString *key, float percent) { |
| 248 | 248 | ||
| 249 | !progress ? : progress(percent); | 249 | !progress ? : progress(percent); |
| 250 | - } params:dic checkCrc:YES cancellationSignal:nil]; | 250 | + } params:dic checkCrc:YES cancellationSignal:^BOOL{ |
| 251 | + return YES; | ||
| 252 | + }]; | ||
| 251 | self.qnUploadOption = opt; | 253 | self.qnUploadOption = opt; |
| 252 | [_qnUploadManager putData:data key:key token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { | 254 | [_qnUploadManager putData:data key:key token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { |
| 253 | 255 | ||
| @@ -307,7 +309,9 @@ static CNLiveUploadManager *_uploadManager; | @@ -307,7 +309,9 @@ static CNLiveUploadManager *_uploadManager; | ||
| 307 | currentPresent += percent; | 309 | currentPresent += percent; |
| 308 | NSLog(@"输出个数%f",currentPresent);//单个视频的进度 | 310 | NSLog(@"输出个数%f",currentPresent);//单个视频的进度 |
| 309 | !progress ? : progress(currentPresent); | 311 | !progress ? : progress(currentPresent); |
| 310 | - } params:dic checkCrc:YES cancellationSignal:nil]; | 312 | + } params:dic checkCrc:YES cancellationSignal:^BOOL{ |
| 313 | + return YES; | ||
| 314 | + }]; | ||
| 311 | self.qnUploadOption = opt; | 315 | self.qnUploadOption = opt; |
| 312 | [_qnUploadManager putPHAsset:phAsset key:key token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { | 316 | [_qnUploadManager putPHAsset:phAsset key:key token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { |
| 313 | dispatch_async(dispatch_get_main_queue(), ^{ | 317 | dispatch_async(dispatch_get_main_queue(), ^{ |
| @@ -360,7 +364,9 @@ static CNLiveUploadManager *_uploadManager; | @@ -360,7 +364,9 @@ static CNLiveUploadManager *_uploadManager; | ||
| 360 | 364 | ||
| 361 | NSLog(@"输出个数%f",percent);//单个视频的进度 | 365 | NSLog(@"输出个数%f",percent);//单个视频的进度 |
| 362 | !progress ? : progress(percent); | 366 | !progress ? : progress(percent); |
| 363 | - } params:dic checkCrc:YES cancellationSignal:nil]; | 367 | + } params:dic checkCrc:YES cancellationSignal:^BOOL{ |
| 368 | + return YES; | ||
| 369 | + }]; | ||
| 364 | self.qnUploadOption = opt; | 370 | self.qnUploadOption = opt; |
| 365 | [_qnUploadManager putFile:file key:key token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { | 371 | [_qnUploadManager putFile:file key:key token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { |
| 366 | dispatch_async(dispatch_get_main_queue(), ^{ | 372 | dispatch_async(dispatch_get_main_queue(), ^{ |
| @@ -434,7 +440,9 @@ static CNLiveUploadManager *_uploadManager; | @@ -434,7 +440,9 @@ static CNLiveUploadManager *_uploadManager; | ||
| 434 | }.copy; | 440 | }.copy; |
| 435 | QNUploadOption *opt = [[QNUploadOption alloc] initWithMime:nil progressHandler:^(NSString *key, float percent) { | 441 | QNUploadOption *opt = [[QNUploadOption alloc] initWithMime:nil progressHandler:^(NSString *key, float percent) { |
| 436 | 442 | ||
| 437 | - } params:dic checkCrc:YES cancellationSignal:nil]; | 443 | + } params:dic checkCrc:YES cancellationSignal:^BOOL{ |
| 444 | + return YES; | ||
| 445 | + }]; | ||
| 438 | self.qnUploadOption = opt; | 446 | self.qnUploadOption = opt; |
| 439 | [strongManager putData:dataArr[index] key:keys[index] token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { | 447 | [strongManager putData:dataArr[index] key:keys[index] token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { |
| 440 | 448 |