App Reports File Upload Result

2022-06-24
No Rating

Device report media file loading result

Topic:

thing/product/{pid}/events

Parameter Explanation:

ParameterRequiredTypeIllustration
tidYesstring
bidYesstring
methodYesstringmessage Type
timestampYesint13-bit timestamp
dataYesobject
» resultYintThe response result of 0 means normal
» fileYobject
»» object_keyYstringThe key of file in object storage bucket
»» pathYstringBussiness path of file
»» nameYstringFile name
»» extYobjectFile association extension fields
»»» flight_idYstringMission ID
»»» is_originalYstringis orginal photo or not
»»» drone_model_keyYstringAircraft Product Enumeration Values
»»» payload_model_keyYstringPayload Product Enumeration Values
»» metadataYobjectmedia metadata
»»» gimbal_yaw_degreeYstringGimbal yaw degree
»»» absolute_altitudeYstringAbsolute altitude of shooting
»»» relative_altitudeYstringRelative altitude of shooting
»»» create_timeYstringShooting time of media
»»» shoot_positionYstringShooting location
»»»» latYstringLatitude of shooting location
»»»» lngYstringLongitude 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:

ParameterRequiredTypeIllustration
tidYstring
bidYstring
methodYstringmessage Type
timestampYint13-bit timestamp
dataYobject
» resultYintThe 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 
  }
}