对象存储 OSS只获取Object的Meta信息
详细解答可以参考官方帮助文档下面代码用于获取Object的元信息:
OSSHeadObjectRequest * head = [OSSHeadObjectRequest new];head.bucketName = @'';head.objectKey = @'';OSSTask * headTask = [client headObject:head];[headTask continueWithBlock:^id(OSSTask *task) { if (!task.error) { OSSHeadObjectResult * headResult = task.result; NSLog(@'all response header: %@', headResult.httpResponseHeaderFields); // some object properties include the 'x-oss-meta-*'s NSLog(@'head object result: %@', headResult.objectMeta); } else { NSLog(@'head object error: %@', task.error); } return nil;}];
赞0
踩1