App Reports File Upload Result

2024-10-25
No Rating

Report Media Upload Result

POST /media/api/v1/workspaces/{workspace_id}/upload-callback

Parameters

NameInTypeRequiredDescription
workspace_idpathstringtrueworkspace id
x-auth-tokenheaderstringtrueaccess token
bodybodymedia.UploadCallbackInputtrue

Responses

StatusMeaningDescriptionSchema
200OKopen in new windowOKmedia.UploadCallbackOutput

Example responses

{
    "code":0,
    "message":"success",
   	"data":{
      "object_key":"5asjwu24-2a18-4b4b-86f9-3a678da0bf4d/example.jpg"
    }
}

Schemas

media.UploadCallbackInput

{
  "result": 0,
  "ext": {
    "file_group_id": "string",
    "drone_model_key": "string",
    "is_original": true,
    "payload_model_key": "string",
    "tinny_fingerprint": "string",
    "sn": "string"
  },
  "fingerprint": "string",
  "metadata": {
    "absolute_altitude": 0,
    "created_time": "string",
    "gimbal_yaw_degree": 0,
    "relative_altitude": 0,
    "shoot_position": {
      "lat": 0,
      "lng": 0
    }
  },
  "name": "string",
  "object_key": "string",
  "path": "string",
  "sub_file_type": 0
}

Properties

NameTypeRequiredRestrictionsDescription
resultinttruenoneWhether the file is successfully uploaded to the storage bucket. Non-zero means failure.
extmedia.MediaFilefalsenoneextended attributes for file associations
fingerprintstringfalsenonefile fingerprint
metadatamedia.MetaDatafalsenonemedia metadata
namestringtruenonefilename
object_keystringtruenonethe key of the file in the object storage bucket
pathstringfalsenonethe business path of the file
sub_file_typeintegerfalsenonevalid when the file is a picture
* 0 - normal picture
* 1 - panorama

media.MediaFile

{
  "file_group_id": "string",
  "drone_model_key": "string",
  "is_original": true,
  "payload_model_key": "string",
  "tinny_fingerprint": "string",
  "sn": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
file_group_idstringfalsenonefile group id
drone_model_keystringfalsenonedevice product enum
is_originalbooleanfalsenonewhether is the original image
payload_model_keystringfalsenonepayload product enum
tinny_fingerprintstringfalsenonetiny fingerprint
snstringfalsenoneserial number

media.MetaData

{
  "absolute_altitude": 0,
  "created_time": "string",
  "gimbal_yaw_degree": 0,
  "relative_altitude": 0,
  "shoot_position": {
    "lat": 0,
    "lng": 0
  }
}

Properties

NameTypeRequiredRestrictionsDescription
absolute_altitudenumberfalsenoneabsolute height
created_timestringfalsenonemedia created time
gimbal_yaw_degreenumberfalsenonegimbal yaw degree
relative_altitudeintegerfalsenonerelative height
shoot_positionobjectfalsenonecapturing position
» latintegerfalsenonelatitude of capturing location
» lngintegerfalsenonelongitude of capturing location

media.UploadCallbackOutput

{
  "code": 0,
  "data": {
    "object_key": "string"
  },
  "message": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
codeintegerfalsenoneerror code
datamedia.UploadCallbackOutputDatafalsenonenone
messagestringfalsenonedescription

media.UploadCallbackOutputData

{
  "object_key": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
object_keystringfalsenonethe key of the file in the object storage bucket
If you have any comments or confusion about our documentation, you can click here to give feedback and we will get back to you as soon as possible.