Revit 设计自动化;上传到存储桶时文件大小错误

问题描述 投票:0回答:1

在 Revit WorkItem 流程的 Design Automation 过程中,Revit 模型和所有链接应上传到应用程序存储桶,当我测试轻量级 Revit 文件(每个大约 10Mb)时,它效果很好,但是当我真正构建 Revit 模型(主要文件 4.2Gb)有 24 个链接(从 60Mb 到 2Gb 大小范围),我遇到错误。

状态显示“错误 413”

Postman status response

以及回复消息

"Payload length of 33269 bytes exceeds the allowed limit of 16384 bytes. (Parameter 'ContentLength')"

我正在使用这个 WorkItem,其中描述了所有上传文件:

{
    "activityId": "{{applicationNickname}}.{{revitApplicationId}}Activity+{{revitApplicationAlias}}",
    "arguments": {
        "rvtFile": {
            "url": "urn:adsk.objects:os.object:wip.dm.prod/6470e126-43a9-49b8-abe5-8bd1ad064a0c.rvt",
            "localName" : "Interr_AR.rvt", //--4.3Gb
            "references": [
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/85174092-4d9d-42e4-81e1-2cf70f54a16a.rvt",
                "localName" : "PRK_AR.rvt",//--567Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/14bcd135-76f9-48f0-802a-59f622044666.rvt",
                "localName" : "PRK_CMI_M.rvt",//--331Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/bba52679-0317-4918-bedb-94bb8557d8fd.rvt",
                "localName" : "PRK_ST.rvt",//--222Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/a1e17364-b950-484b-a1bc-5d78ffe69d33.rvt",
                "localName" : "BLDNG_ARUP_E.rvt",//--284Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/5ac9dbf8-b064-4f23-bd40-0ab015c49983.rvt",
                "localName" : "BLDNG_CMI_MD.rvt",//--515Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/bc15fb42-1be4-4d09-afc0-670cab90e26f.rvt",
                "localName" : "BLDNG_CMI_MP.rvt",//--577Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/6673fbd6-275d-4aa1-a103-50a304f2dd86.rvt",
                "localName" : "BLDNG_FS.rvt",//--290Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/d7920542-4900-40fa-9145-c1033f30d51a.rvt",
                "localName" : "BLDNG_GS.rvt",//--203Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/62b93ae7-c414-4ea2-a053-38d030ef559c.rvt",
                "localName" : "BLDNG_M.rvt",//--141.4Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/97541c10-c05f-4dd1-9fd0-7ee7d0d9a500.rvt",
                "localName" : "BLDNG_P.rvt",//--106Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/3f561390-903b-4b5f-a95e-1e3b5ac7dae3.rvt",
                "localName" : "BLDNG_PLIFT.rvt",//--101Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/710cf78b-77fd-446c-9498-7399b9d3cfb0.rvt",
                "localName" : "BLDNG_PPM_MAC.rvt",//--286Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/7996b88e-1ca3-4b91-a0d9-8fbfc6183a97.rvt",
                "localName" : "BLDNG_PPM_PL_MG.rvt",//--1.9Gb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/639dbb20-29c5-4a86-8ec4-3c835908c9e5.rvt",
                "localName" : "BLDNG_PPM_PL_PG.rvt",//--576Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/dd5301eb-3502-4e98-b6f4-cc38f6247cba.rvt",
                "localName" : "BLDNG_REI_E.rvt",//--487Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/7ab9c8e7-6d0c-4fc7-81c1-a9c4a465e404.rvt",
                "localName" : "LAYOUT TEMPLATE.rvt",//--7Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/03322d3a-eeb0-435c-b656-6e3cd0da21ad.rvt",
                "localName" : "BLDNG_TRANSLOGIC_PTC.rvt",//--487Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/0e2edb3d-1021-44d1-91f4-e48240d134db.rvt",
                "localName" : "BLDNG_SE.rvt",//--462Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/1abd6eb3-087a-4f98-a88b-12a8f70a5cfc.rvt",
                "localName" : "BLDNG_ST.rvt",//--80Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/e376cd0c-e18b-46b7-a104-e9b72b6c626e.rvt",
                "localName" : "BLDNG_Shell_AR.rvt",//--86Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/529df3ae-cbb8-439c-a904-b1c44d27e426.rvt",
                "localName" : "SitePlane_AR.rvt",//--96Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/95e979d7-cb85-4d47-b40c-3ca2e30ffa74.rvt",
                "localName" : "Furniture.rvt",//--97Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/30ff421d-8757-43e0-9251-2eac817a0b2a.rvt",
                "localName" : "Grids.rvt",//--15Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              },
              {
                "url": "urn:adsk.objects:os.object:wip.dm.prod/c481d4c1-85ee-4f0c-a449-77701f09b4b1.rvt",
                "localName" : "RF Shielding.rvt",//--106Mb
                "headers": {
                    "Authorization": "Bearer {{token}}"
                }
              }
            ],
            "headers": {
                "Authorization": "Bearer {{token}}"
            }
            
        },
        "input" :{
            "url": "data:application/json,{ \"Names\" : [ \"XYICON LEVEL 1 Revised\", \"XYICON LEVEL 2 Revised\", \"XYICON LEVEL 3 Revised\", \"XYICON LEVEL 4 Revised\", \"XYICON LEVEL 5 Revised\", \"XYICON LEVEL 6 Revised\", \"XYICON LOWER LEVEL Revised\", \"XYICON ROOF LEVEL Revised\"] }",
            "headers": {
                "Authorization": "Bearer {{token}}"
            }
        },
        "output_zip_file": {
            "url": "urn:adsk.objects:os.object:{{bucketKey}}/revit_output.zip",
            "verb": "post",
            "headers": {
                    "Authorization": "Bearer {{token}}"
                }
        },
        "outputJsonFile": {
            "url": "urn:adsk.objects:os.object:{{bucketKey}}/output.json",
            "verb": "post",
            "headers": {
                "Authorization": "Bearer {{token}}"
            }
        }
    }
}

它们都相当小,但总的来说大约有 12Gb。将文件压缩为一个并将其上传到存储桶中是否有意义?

有什么方法可以在文件所在的位置处理文件(不要复制到存储桶)?

是否有处理大文件(超过 5Gb)的解决方案?

autodesk-forge revit-api autodesk-designautomation autodesk-data-management
1个回答
0
投票

工作项的 JSON 负载的最大允许大小为 16KB。但是,包含不记名令牌后,有效负载约为 32KB。这就是您遇到 413 Payload Too Large 错误的原因。我建议将有效负载保持在 16KB 以内。您还可以从插件中获取这些文件,因为 DA 允许插件代码中的网络请求。我将有效负载内容复制到

wi.json
并进行了测试。

参考:https://aps.autodesk.com/en/docs/design-automation/v3/developers_guide/rate-limits/da-rate-limits/

wor1

© www.soinside.com 2019 - 2024. All rights reserved.