Generic Event Upload Design Notes
-
intelligence_enabled == 2 // Custom event upload enabled
-
ai_upload_address custom upload configuration address
Base directory: "/tmp/alarm"
Each trigger corresponds to a folder under the base directory: "/tmp/alarm/2006-01-02T15-04-05"
If "/tmp/alarm/2006-01-02T15-04-05/finish.txt" under this event folder is detected, this event is complete
Read "/tmp/alarm/2006-01-02T15-04-05/info.txt" to get the passthrough parameters, e.g. alarmType=io&customValue1=abc
The default image name is snap.jpg; do not modify it unless there is a special requirement
Upload URL parameters
Token signature: the key can be changed by the caller using the API key
userValue is not part of the signature
Uploading file:
Content-Type: multipart/form-data
Content-Disposition: form-data; name="filename"; filename="snap.jpg"
Content-Disposition: form-data; name="filename1"; filename="snap1.jpg"
Discard after 3 failed uploads