如何检查存储桶对象是否已翻译
我已经将文件上传到oss并有对象id,如果存储桶对象尚未翻译,那么如何检查衍生信息。与对象 ID?
I've uploaded file to oss and have object id, if bucket object is not yet translated then how to check derivatives info. with object id?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很简单,只需对您的 objectId 进行 Base64 编码,然后调用 获取 {urn}/manifest。如果它返回 404 http 状态代码,则表示此 URN 尚未转换。
如果您的文件存储在 BIM360/ACC 上,您将需要从文件的版本提示中获取派生 URN。请按照本教程进行操作,但找到
relationships.data.derivatives.data.id
而不是 URN,如下例所示。https://forge.autodesk.com/en/docs/bim360/v1/tutorials/document-management/download-document/#step-4-find-the-storage-object-id-for-the- file
使用 yiskang/forge-viewmodels-nodejs-svf2
参考:https://stackoverflow.com/a/70664111/ 7745569
It's straightforward, just base64 encode your objectId, then call GET {urn}/manifest. If it returns a 404 http status code, then it means this URN hasn't got translated.
If your file is stored on BIM360/ACC, you will need to get derivative URN from the file's version tip. Please follow this tutorial, but find
relationships.data.derivatives.data.id
instead for the URN like the below for example.https://forge.autodesk.com/en/docs/bim360/v1/tutorials/document-management/download-document/#step-4-find-the-storage-object-id-for-the-file
Node.js code sample tested with yiskang/forge-viewmodels-nodejs-svf2
ref: https://stackoverflow.com/a/70664111/7745569