创建存储桶时会以“存储桶存在”为响应

时间:2019-08-21 23:58:10

标签: autodesk-forge

在尝试创建临时存储桶时,我设置的许多存储桶名称均导致创建存储桶失败,响应设置为:“原因”:“存储桶已存在”

因此,当我尝试说“ buckettest”和“ buckettest2”(我以前从未创建过)时,仍然得到“ Bucket已经存在”的信息。只有当我尝试混淆存储桶名称时,它才起作用,例如“ DMT123”

我要发布至:https://developer.api.autodesk.com/oss/v2/buckets {       “ bucketKey”:“ buckettest”,       “ policyKey”:“瞬态”     }

2 个答案:

答案 0 :(得分:1)

来自:https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/simplecontent/content/forge-3ds-max-create-bucket.html

bucket_name="nh"+uuid.uuid4().hex+"test1" # must be globally unique!!!

Autodesk Forge中的存储桶名称必须是全局唯一的。您使用的不是全局唯一的。

答案 1 :(得分:0)

请参阅官方文档here

  

bucketKey *   串   您分配给存储桶的唯一名称。它在所有应用程序中必须是全局唯一的,并且   区域,否则呼叫将失败。可能的值:-_。a-z0-9(介于3-128个字符之间   长度)。请注意,您无法更改存储桶键。

并参考代码示例here,将前缀自动附加到存储桶名称并创建全局唯一的存储桶。

相关问题