问题
Please tell me how to get the urn of the bucket file. You can get the urn that is included in the response when uploading to the bucket, but I'd like to obtain the urn of the file already uploaded to the bucket. Is there any way?
回答1:
You can use the GET /buckets/:bucketKey/objects endpoint to get a list of all files in your bucket. In the response, each file will have its objectId
(for example, urn:adsk.objects:os.object:mybucket/myfile
). Take the objectId
and encode it in base64, for example, using https://www.base64encode.org. The encoded string is your URN.
来源:https://stackoverflow.com/questions/52267698/how-to-get-the-urn-of-the-bucket-file