Overview
EveryDeviceClient instance includes a cdn property for uploading files (screenshots, logs, sensor data exports) to the Lua CDN and downloading files from it. The CDN is authenticated using the same API key as the device connection.
Methods
upload
Upload a file to the CDN. Returns aCdnUploadResult with the file ID and public URL.
File content as a Node.js Buffer or Blob.
Filename including extension (e.g.,
screenshot.png, sensor-log.csv).MIME type (e.g.,
image/png, text/csv). Defaults to application/octet-stream.CdnUploadResult
download
Download a file from the CDN by its file ID.The file ID returned from a previous upload.
Buffer containing the file content.
getUrl
Get the public URL for a file without downloading it.The file ID returned from a previous upload.
string — the full CDN URL.
Use Cases
Screenshots
Kiosk devices capturing screen state for debugging or audit.
Sensor Logs
Periodic CSV or JSON exports of accumulated sensor readings.
Photos
Camera-equipped devices uploading inspection photos.
Firmware Reports
Diagnostic reports uploaded for agent analysis.
Example: Screenshot Upload
A kiosk device that takes a screenshot when the agent requests it and uploads it to the CDN:Next Steps
Node.js Client
Full client reference including CDN property
Retail Kiosk Example
Complete kiosk example with CDN uploads
API Reference
CDN class method signatures

