【发布时间】:2021-12-28 22:44:28
【问题描述】:
我创建了一个如下所示的存储桶(Python):
payload = {'bucketKey' : bucketname,'policyKey' : 'transient'}
resp = requests.post(Forge_BASE_URL+'/oss/v2/buckets', headers={'Authorization': config.token,'Content-Type':'application/json'},json=payload)
然后将文件上传到创建的bucket中:
url = 'https://developer.api.autodesk.com/oss/v2/buckets/'+bucketname+'/objects/'+encodedfilename
resp = requests.put(url, headers={'Authorization': config.token,'Content-Type' : 'application/octet-stream','Content-Length' : str(filesize)},data= open(modelfilePath + filename, 'rb'))
如何将存储桶中的对象下载到 Revit Design Automation 引擎的本地路径?
Revit Design Automation 引擎的本地路径类似于 C# 代码中使用的 T:\Aces\Jobs\job_id。
感谢curl 命令或 Python 代码。
【问题讨论】:
标签: autodesk-forge autodesk-data-management