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) - 要删除的对象密钥/路径