Upload File
xbrush_file_uploadUpload local media files to XBrush CDN and get a URL for use as image_url or video_url in other XBrush tools. Supports PNG, JPG, GIF, WebP, MP4, WebM, MP3, WAV.
Instructions
Upload a local file to XBrush CDN and get a URL. Use the returned CDN URL as image_url or video_url in other XBrush tools.
Supported formats: PNG, JPG, GIF, WebP, MP4, WebM, MP3, WAV.
Args: file_path (string, required): Absolute path to the local file. strategy (string, optional): 'auto' (default), 'direct', or 'presign'. - auto: small files (< 10MB) go via direct upload, larger via presigned S3. - direct: POST /v1/files/upload (multipart). - presign: presigned URL + S3 upload (handles large files).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strategy | No | Upload strategy: 'auto' (default) picks by file size; 'direct' uses /v1/files/upload; 'presign' uses /v1/files/presign + S3. | |
| file_path | Yes | Absolute path to the local file to upload. |