开了个源aliyunOSSiOSSDK
上传数据有问题
先谢谢楼主,但是为什么我上传(putObject)之后就没有反应了呢,OSSObjectPutObjectFinish 和 OSSObjectPutObjectFailed都没有调用
关键代码:
//依次上传文件 for (NSString * filepath in array) { //读取文件内容 NSData * data = [NSData dataWithContentsOfFile:filepath]; //objMetadata这个不理解??? ObjectMetadata * objMetadata = [[ObjectMetadata alloc] init]; //上传 [_client putObject:@'flysurvey' key:projectNumber data:data objectMetadata:objMetadata]; [objMetadata release]; }
回调:
#pragma mark - 阿里云上传/** PutObject 方法执行成功 @param client OSSClient @param result PutObjectResult */-(void)OSSObjectPutObjectFinish:(OSSClient*) client result:(PutObjectResult*) result{ NSLog(@'上传成功,%@', result);} /** PutObject 方法执行失败,返回OSSError对象 @param client OSSClient @param error OSSError */-(void)OSSObjectPutObjectFailed:(OSSClient*) client error:(OSSError*) error{ NSLog(@'上传失败,%@', error);}
-------------------------
Re开了个源aliyunOSSiOSSDK
对了,楼主提供的帮助文档地址打不开呢
http://osssdkhelp.sinaapp.com/
赞0
踩0