如何下载清单中的文件

如何下载清单中的文件

本文介绍了Autodesk Forge File Conversion 如何下载清单中的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我成功上传和转换文件后,按照模型衍生为查看器准备文件",我调用清单 url

然后我如何在清单中下载转换后的文件.如果我只知道参考骨灰盒?(即)我将如何获得隐藏的 svf "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA/output/1/A"

或缩略图urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA/output/1/A5.svf.png01_thumb_0p>200x"

有没有可以返回实际位置的api调用?

最终结果是我想创建类似 [extractor] (http://extract.autodesk.io/) 确实如此.我需要在本地运行查看器的所有文件

Edit2:fileUploda 后我从电话中返回的清单

结果{类型":清单","hasThumbnail": "true","状态": "成功",进度":完成","地区": "美国","urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ",衍生物":[{"name": "rac_basic_sample_project_test.rvt","hasThumbnail": "true","状态": "成功",进度":完成","输出类型": "svf",孩子们": [{"name": "{3D}","hasThumbnail": "true","角色": "3d","状态": "成功","类型": "几何",进度":完成",孩子们": [{"name": "{3D}","角色": "3d",相机": [...],"状态": "成功",类型":视图",进度":完成"},{"类型": "资源",骨灰盒":骨灰盒:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plVydzD/Resources/PyvCyds_3B2pvcy5vYmplY3Q6Z3JlZ2"角色": "图形","mime": "应用程序/autodesk-svf"},{"类型": "资源",角色":缩略图","骨灰盒": "骨灰盒:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3D_png/dxlX3Byb2plY3D_png/ypvcy5vYmplY3Q6Z3JlZ2解析度": [100,100],"mime": "图像/png",状态":成功"},

我尝试发送但收到 404 的请求

https://developer.api.autodesk.com/modelderivative/v2/designdata/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ/manifest/urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ/output/Resource/3D_View/_3D_/_3D_1.PNG

对modelderivative 的调用有什么问题吗?

解决方案

使用 derivativeurn GET 工作

我还必须确保derivativeUrn被编码

(JAVA)derivativeUrn = URLEncoder.encode(derivativeUrn, "UTF-8");

Following the Model Derivative "Prepare a File for the Viewer" after I have successfully uploaded and converted file I call the manifest url

how do I then download the converted files in the manifest. If I only know the refrence urn?(i.e.) How would I get the coverted svf "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA/output/1/A5.svf"

or the thumbnail"urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA/output/1/A5.svf.png01_thumb_200x200.png"

Is there a api call that can be used to return the actual location?

Edit: The end result is I want to create something like the [extractor] (http://extract.autodesk.io/) does. With all the files I need to run the viewer locally

Edit2:The Manifest I get back from call after fileUploda

Result{
  "type": "manifest",
  "hasThumbnail": "true",
  "status": "success",
  "progress": "complete",
  "region": "US",
  "urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ",
  "derivatives": [
    {
      "name": "rac_basic_sample_project_test.rvt",
      "hasThumbnail": "true",
      "status": "success",
      "progress": "complete",
      "outputType": "svf",
      "children": [
        {
          "name": "{3D}",
          "hasThumbnail": "true",
          "role": "3d",
          "status": "success",
          "type": "geometry",
          "progress": "complete",
          "children": [
            {
              "name": "{3D}",
              "role": "3d",
              "camera": [
             ...
              ],
              "status": "success",
              "type": "view",
              "progress": "complete"
            },
            {
              "type": "resource",
              "urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ/output/Resource/3D_View/_3D_/_3D_.svf",
              "role": "graphics",
              "mime": "application/autodesk-svf"
            },
            {
              "type": "resource",
              "role": "thumbnail",
              "urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ/output/Resource/3D_View/_3D_/_3D_1.png",
              "resolution": [
                100,
                100
              ],
              "mime": "image/png",
              "status": "success"
            },

The Request I try to send but get a 404

https://developer.api.autodesk.com/modelderivative/v2/designdata/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ/manifest/urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Z3JlZ2JpbWJ1Y2tldC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfdGVzdC5ydnQ/output/Resource/3D_View/_3D_/_3D_1.png

Is there anything wrong with that call to modelderivative?

解决方案

Using the derivativeurn GET worked

I also had to make sure the derivativeUrn was encoded

(JAVA) derivativeUrn = URLEncoder.encode(derivativeUrn, "UTF-8");

这篇关于Autodesk Forge File Conversion 如何下载清单中的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 13:59