FIVEMESH_API_KEY, so these exports should be called from server-side Lua or JavaScript.
Upload a file
UseuploadFile when you already have bytes, a data URL or a Blob-compatible value.
publicUrl.
Upload an image data URL
UseuploadImage when a script gives you an image as a data URL.
Use an API key profile
PasskeyProfile when an export should use a named key such as FIVEMESH_API_KEY_MUGSHOTS instead of the default FIVEMESH_API_KEY.
FIVEMESH_API_KEY_.
Upload multiple files
UsebulkUpload when a resource needs to upload a small batch and handle per-file results.
List CDN objects
UselistObjects with a path and optional pagination limit.
continuationToken is returned, pass it to the next call.
Delete objects
UsedeleteObject for one path or bulkDelete for a batch.
Purge CDN files
UsepurgeObjects when a resource needs Cloudflare to refresh public CDN files after an overwrite or external change. The paths are bucket-relative and must be allowed by the service key.
cdn:purge for this export.
Export reference
| Export | Description |
|---|---|
listObjects(options) | Lists objects under an allowed CDN path. |
uploadFile(data, options) | Uploads one file to FiveMesh CDN. |
uploadImage(dataUrl, metadata, options) | Uploads an image data URL. |
bulkUpload(items, options) | Uploads multiple files and returns per-file results. |
deleteObject(path, options) | Deletes one object path. |
bulkDelete(paths, options) | Deletes multiple object paths and returns per-path results. |
purgeObjects(paths, options) | Purges public CDN cache for one or more object paths. |