iOS 七牛多张图片上传
2016-01-13 16:22
316 查看
-(void)uploadImages:(NSArray *)images atIndex:(NSInteger)index token:(NSString *)token uploadManager:(QNUploadManager *)uploadManager keys:(NSMutableArray *)keys{ UIImage *image = images[index]; __block NSInteger imageIndex = index; NSData *data = UIImageJPEGRepresentation(image, 0.5); NSTimeInterval time= [[NSDate new] timeIntervalSince1970]; NSString *filename = [NSString stringWithFormat:@"%@_%ld_%.f.%@",@"status",686734963504054272,time,@"jpg"]; [uploadManager putData:data key:filename token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { if (info.isOK) { [keys addObject:key]; NSLog(@"idInex %ld,OK",index); imageIndex++; if (imageIndex >= images.count) { NSLog(@"上传完成"); for (NSString *imgKey in keys) { NSLog(@"%@",imgKey); } return ; } [self uploadImages:images atIndex:imageIndex token:token uploadManager:uploadManager keys:keys]; } } option:nil]; }
相关文章推荐
- iOS中的单例模式
- IOS的GSON
- IOS使用ijkPlayer
- iOS上传视频文件
- iOS 使button按钮的文本框靠左显示
- NSPredicate iOS中非常强大的过滤器
- iOS开发之git(二)
- iOS指定页面旋转
- 设置cell间距
- IOS集成到支付宝的步骤及问题
- iOS Developer Program开发者证书的区别
- iOS 图文混排 链接 可点击
- iOS开发笔记--基于面向协议MVP模式下的软件设计
- iOS 字体加粗
- Git忽略规则及.gitignore规则不生效的解决办法
- 【学习总结】iOS中NSNotification、delegate、KVO三者之间的区别与联系?
- iOS(五)基于XMPP的聊天:一
- iOS开发多线程篇—GCD介绍
- 华为服务器RH5885 V3进入BIOS
- iOS个人整理08-touch触摸事件和手势识别器