Skip to main content

Exports

Generates a pre-signed URL for uploading files.
Parameters
  • mimeType: string - MIME type of the file (e.g., image/png, image/jpeg)
  • size: number - File size in bytes
  • metadata: table - Key-value pairs for custom metadata (optional)
Returns
  • signedUrl: string - Pre-signed URL for uploading
Uploads a file directly using base64 or raw data.
Parameters
  • data: string - Base64 encoded file data
  • metadata: table - Key-value pairs for custom metadata (optional)
Returns
  • url: string - Public URL of the uploaded file
  • id: string - Unique media ID
Deletes a file from cloud storage.
Parameters
  • mediaId: string - The media ID to delete
Returns
  • success: boolean - true if deletion was successful

Lua Library

For a cleaner API, include the server Lua library in your fxmanifest.lua:
Usage