Overview
EveryDeviceClient instance includes a cdn property for uploading files such as screenshots, logs, and sensor data exports. The CDN uses the same credential as the device connection. A new device credential must include the assets.upload operation before this client can upload files.
Methods
upload
Upload a file to the CDN. Returns aCdnUploadResult with the file ID and public URL.
Buffer | Blob
required
File content as a Node.js Buffer or Blob.
string
required
Filename including extension (e.g.,
screenshot.png, sensor-log.csv).string
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.string
required
The file ID returned from a previous upload.
Buffer containing the file content.
getUrl
Get the public URL for a file without downloading it.string
required
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

