当遵循这里描述的步骤时:https://forge.autodesk.com/en/docs/design-automation/v3/tutorials/revit/step4-publish-appbundle/#step-3-upload-the-appbundle我得到一个Aws特定的错误。
<Error><Code>AccessDenied</Code><Message>No AWSAccessKey was presented.</Message>我已经验证了我的请求,但似乎标题和所有表单数据都已正确设置,如本例所述:
curl -X POST \
https://dasprod-store.s3.amazonaws.com \
-H 'Cache-Control: no-cache' \
-F key=apps/Revit/DeleteWallsApp/1 \
-F content-type=application/octet-stream \
-F policy=eyJleHBpcmF0aW9uIjoiMjAxOC... (truncated) \
-F success_action_status=200 \
-F success_action_redirect= \
-F x-amz-signature=6c68268e23ecb8452... (truncated) \
-F x-amz-credential=ASIAQ2W... (truncated) \
-F x-amz-algorithm=AWS4-HMAC-SHA256 \
-F x-amz-date=20180810... (truncated) \
-F x-amz-server-side-encryption=AES256 \
-F 'x-amz-security-token=FQoGZXIvYXdzEPj//////////wEaDHavu... (truncated)' \
-F 'file=@path/to/your/app/zip'当然,所有值都已替换为从
curl -X POST \
https://developer.api.autodesk.com/da/us-east/v3/appbundles \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"id": "DeleteWallsApp",
"engine": "Autodesk.Revit+2018",
"description": "Delete Walls AppBundle based on Revit 2018"
}'现在,由于这是一个AWS特定的错误,可能对AWS api进行了一些更改,forge文档中给出的示例是不是最新的?
发布于 2020-03-02 22:47:29
这似乎是客户的问题。
我在node.js中使用了request npm包,并将formData设置为form属性的一部分,而不是formData属性。
const request = require('request-promise');
return request.post(uploadParameters.endpointURL, {
headers: {
'Content-Type': 'multipart/form-data',
'Cache-Control': 'no-cache'
},
formData: { // use formData instead of form
...uploadParameters.formData,
file: fs.createReadStream(EXPECTED_APPBUNDLE_PATH)
}
})发布于 2020-03-02 23:41:20
很高兴你弄清楚了到底是怎么回事:)
如果您需要用于设计自动化的nodejs示例/示例,您可以查看此存储库。尽管它是为3ds Max构建的,但设计自动化的概念仍然是相同的。
希望里面的一些东西能对你有用。
https://stackoverflow.com/questions/60489155
复制相似问题