App Reports File Upload Result
Device report media file loading result
Topic:
thing/product/{pid}/events
Parameter Explanation:
Parameter | Required | Type | Illustration |
---|---|---|---|
tid | Yes | string | |
bid | Yes | string | |
method | Yes | string | message Type |
timestamp | Yes | int | 13-bit timestamp |
data | Yes | object | |
» result | Y | int | The response result of 0 means normal |
» file | Y | object | |
»» object_key | Y | string | The key of file in object storage bucket |
»» path | Y | string | Bussiness path of file |
»» name | Y | string | File name |
»» ext | Y | object | File association extension fields |
»»» flight_id | Y | string | Mission ID |
»»» is_original | Y | string | is orginal photo or not |
»»» drone_model_key | Y | string | Aircraft Product Enumeration Values |
»»» payload_model_key | Y | string | Payload Product Enumeration Values |
»» metadata | Y | object | media metadata |
»»» gimbal_yaw_degree | Y | string | Gimbal yaw degree |
»»» absolute_altitude | Y | string | Absolute altitude of shooting |
»»» relative_altitude | Y | string | Relative altitude of shooting |
»»» create_time | Y | string | Shooting time of media |
»»» shoot_position | Y | string | Shooting location |
»»»» lat | Y | string | Latitude of shooting location |
»»»» lng | Y | string | Longitude of shooting location |
Example:
// topic thing/product/{pid}/events
{
"method":"file_upload_callback",
"tid":"1234",
"bid":"456",
"timestamp":"1234567890123",
"data":{
"result":0,
"progress": 0,
"file":{
"object_key":"object_key",
"path":"xxx",
"name":"dog.jpeg",
"fingerprint":"xxx",
"type":1,
"ext":{
"flight_id":"xxx",
"drone_model_key": "0-67-0",
"payload_model_key": "0-67-0",
"is_original":true
},
"metadata":{
"latitude":22.1,
"longitude":122.5,
"gimbal_yaw_degree":"-91.40",
"absolute_altitude":56.311,
"relative_altitude":41.124,
"create_time":"2021-05-10 16:04:20"
}
}
}
}
Server reply for device media file loading result
Topic:
thing/product/{pid}/events_reply
Parameter Explanation:
Parameter | Required | Type | Illustration |
---|---|---|---|
tid | Y | string | |
bid | Y | string | |
method | Y | string | message Type |
timestamp | Y | int | 13-bit timestamp |
data | Y | object | |
» result | Y | int | The response result of 0 means normal |
// topic thing/product/{pid}/events_reply
{ "method":"file_upload_callback",
"tid":"1234",
"bid":"456",
"timestamp": "1234567890123",
"data":{
"result": 0
}
}