Find the anon key with npx @insforge/cli secrets get ANON_KEY, or in the dashboard: click Install and open API Keys.
from()
取得儲存空間貯體例項以進行檔案操作。
bucketName (string, required) - 儲存空間貯體的名稱
upload()
使用特定路徑/金鑰上傳檔案。
path (string, required) - 檔案的物件金鑰/路徑
file (File | Blob, required) - 要上傳的檔案或 Blob
如果存在具有相同金鑰的檔案,後端會自動重新命名。一律使用傳回的 key 和 url。
uploadAuto()
使用自動產生的唯一金鑰上傳檔案。
file (File | Blob, required) - 要上傳的檔案或 Blob
download()
將檔案下載為 Blob。
path (string, required) - 要下載的物件金鑰/路徑
remove()
從儲存空間刪除檔案。
path (string, required) - 要刪除的物件金鑰/路徑