Skip to main content

Create Image Metadata

  • Creates metadata about the stored image
  • Stores the image as private (requires signed URL to access)

Create Video Metadata

  • Creates metadata for a video file

Create Audio Metadata

  • Creates metadata for audio file

Create Attachment Metadata

  • Creates metadata for the attachment

Create File Resource

  • Creates a file resource from provided data

Get File Resource Data

  • Reads contents of a stored file resource

Delete File

  • Deletes a file from the specified path
  • Requires full path to the file
  • Permanently removes the file
  • Use with caution as deletion cannot be undone

Sign Private File URL

  • Generates a temporary signed URL for accessing private files

Notes on Returned Metadata

All storage.create_* functions return a metadata object with fields such as:
  • id: Unique identifier for the file resource
  • name: File name
  • size: File size in bytes
  • mime: MIME type
  • path: Storage path
  • url: Public URL (if access is public)
  • created_at: Timestamp
Refer to the XanoScript documentation for the full schema.

Error Handling Example

If you attempt to read or delete a file that does not exist, Xano will throw an error. You can handle this with try_catch: