传输方案
二进制传输
后端生成文件,返回二进制给前端文章来源:https://www.toymoban.com/news/detail-518546.html
案例
- 设置 Content-Type 未对应文件的 MIME类型
- 将文件内容二进制写入http body
文本数据传输
后端返回数据,前端生成文件文章来源地址https://www.toymoban.com/news/detail-518546.html
案例报文:
{
"Response": {
"Code": 0,
"Data": {
"Offset1": 0,//sheet偏移量
"Sheet1": [ //sheet页数据
{
"PointName": "属性名称",
"PointAlias": "属性别名",
"PointAddressConfig": "",
"DataType": "数据类型",
"DataUnit": "单位",
"Remark": "备注",
"AccessRight": "访问权限",
"ValueRange": "取值范围"
},
{
"PointName": "a1",
"PointAlias": "a1",
"PointAddressConfig": "",
"DataType": "int",
"DataUnit": "",
"Remark": "",
"AccessRight": "3",
"ValueRange": "1~100"
},
{
"PointName": "a2",
"PointAlias": "a2",
"PointAddressConfig": "",
"DataType": "int",
"DataUnit": "",
"Remark": "",
"AccessRight": "3",
"ValueRange": "1~100"
}
]
}
}
}
到了这里,关于http文件上传下载方案的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!