设备上报获取文件上传URL请求
功能介绍
设备上报获取文件上传URL信息请求。
Topic
Topic: $oc/devices/{device_id}/sys/events/up
参数说明
|
字段名 |
必选/可选 |
类型 |
参数描述 |
|---|---|---|---|
|
object_device_id |
可选 |
String |
事件对应的最终目标设备,没有携带则表示目标设备即topic中指定的设备 |
|
services |
可选 |
List<ServiceEvent> |
事件服务列表 |
ServiceEvent定义表
|
字段名 |
必选/可选 |
类型 |
参数描述 |
|---|---|---|---|
|
service_id |
必选 |
String |
$file_manager |
|
event_type |
必选 |
String |
get_upload_url |
|
event_time |
可选 |
String |
事件时间 |
|
paras |
必选 |
Object |
事件参数JSON对象 |
paras参数列表
|
字段名 |
必选/可选 |
类型 |
参数描述 |
|---|---|---|---|
|
file_name |
必选 |
String |
待上传文件名称 |
|
file_attributes |
可选 |
Object |
文件属性,JSON格式的Object对象 |
示例
Topic: $oc/devices/{device_id}/sys/events/up
数据格式:
{
"object_device_id": "{object_device_id}",
"services": [{
"service_id": "$file_manager",
"event_type": "get_upload_url",
"event_time": "20151212T121212Z",
"paras": {
"file_name": "a.jpg",
"file_attributes": {
"hash_code": "58059181f378062f9b446e884362a526",
"size": 1024
}
}
}]
}
Last Article: 文件上传/下载管理
Next Article: 平台下发文件上传临时URL
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.