Skip to main content

Installation

Find the anon key with npx @insforge/cli secrets get ANON_KEY, or in the dashboard: click Install and open API Keys.

from()

Get a bucket instance for file operations.

Parameters

  • bucketName (string, required) - Name of the storage bucket

Returns

Example


upload()

Upload a file with a specific path/key.

Parameters

  • path (string, required) - The object key/path for the file
  • file (File | Blob, required) - File or Blob to upload

Returns

Uploading to an existing key replaces the current object. Use uploadAuto() when you want a unique key generated automatically.

Example

Output


uploadAuto()

Upload a file with auto-generated unique key.

Parameters

  • file (File | Blob, required) - File or Blob to upload

Returns

Example

Output


download()

Download a file as Blob.

Parameters

  • path (string, required) - The object key/path to download

Returns

Example

Output


remove()

Delete a file from storage.

Parameters

  • path (string, required) - The object key/path to delete

Returns

Example

Output