我試圖從存儲桶中刪除一個對象。閱讀文檔聽起來非常簡單,但我似乎無法使其工作。從存儲桶中刪除文件
我按照說明here,試圖刪除這個對象,我可以看到使用https://developer.api.autodesk.com/oss/v2/buckets/my-persistent-bucket/objects
:
bucketKey => 'my-persistent-bucket'
objectKey => '--test2.dwg'
objectId => 'urn:adsk.objects:os.object:my-persistent-bucket/--test2.dwg'
sha1 => '477085439a60779064d91fd1971d53c77c7a163a'
size => (int) 188600
location => 'https://developer.api.autodesk.com/oss/v2/buckets/my-persistent-bucket/objects/--test2.dwg'
根據我們使用這個終點的文檔:
https://developer.api.autodesk.com/oss/v2/buckets/:bucketKey/objects/:objectName
在哪裏
:bucketKey
is url encoded 'my-persistent-bucket'
:objectName
是URL中使用PHP的urlencode()
及以下的base64編碼函數編碼'urn:adsk.objects:os.object:my-persistent-bucket/--test2.dwg'
我已經試過:
private function _base64url_encode($data) {
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}
來編碼:bucketKey
和:objectName
,但不管我怎麼努力,我總是對其進行編碼得到:
404 : Object not found
任何人都可以幫助我瞭解我哪裏出錯了嗎?
非常感謝