简体   繁体   English

如何从V2 Box iOS SDK获取文件扩展名和路径?

[英]How to get file extension and path from V2 Box iOS SDK?

I'm trying to retrieve the metadata from my box account via the IOS API V2 from BOX. 我正在尝试通过BOX的IOS API V2从我的Box帐户中检索元数据。

Digging into the API It looks like there is no field for the "file extension" and the "full path": 深入研究API似乎没有“文件扩展名”和“完整路径”的字段:

- (id)initWithQueryStringParameters:(NSDictionary *)queryStringParameters
{
    self = [super initWithQueryStringParameters:queryStringParameters];
    if (self != nil)
    {
        _name = nil;
        _description = nil;
        _contentCreatedAt = nil;
        _contentModifiedAt = nil;
        _parentID = nil;
        _sharedLink = nil;
    }

return self;

} }

Please correct me if I'm wrong (and maybe show me where in the API these metadata are listed, thanks !) 如果我写错了,请纠正我(也许告诉我这些元数据在API中的位置,谢谢!)

If I'm not wrong...probably initWithQueryStringParameters should have in the future two extra fields (_fileExtension and _path) and this could be considered a RFE. 如果我没有记错的话... initWithQueryStringParameters将来可能会再有两个额外的字段(_fileExtension和_path),因此可以将其视为RFE。

I would not consider this lack of additional metadata too much of a big deal (will make a 2 liners to extract the extension and some hack to put together the path components) but would be nice to have them.. . 我不会认为缺少额外的元数据没有什么大不了的(将使用2个衬里提取扩展名,并使用一些技巧将路径组件放在一起),但是拥有它们会很好。

Thanks, dom 谢谢,dom

原始Box API中的完整路径称为path_collection,它是一个可选字段,您可以通过API调用上的?fields =参数来请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM