Create Image Metadata
Example
Example
- Creates metadata about the stored image
Private Access Example
Private Access Example
- Stores the image as private (requires signed URL to access)
Create Video Metadata
Example
Example
- Creates metadata for a video file
Create Audio Metadata
Example
Example
- Creates metadata for audio file
Create Attachment Metadata
Example
Example
- Creates metadata for the attachment
Create File Resource
Example
Example
- Creates a file resource from provided data
Get File Resource Data
Example
Example
- Reads contents of a stored file resource
Delete File
Example
Example
- 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
Example
Example
- Generates a temporary signed URL for accessing private files
Notes on Returned Metadata
Allstorage.create_* functions return a metadata object with fields such as:
id: Unique identifier for the file resourcename: File namesize: File size in bytesmime: MIME typepath: Storage pathurl: Public URL (if access is public)created_at: Timestamp
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 withtry_catch: