1、打开IIS
2、添加网站
3、填写相应信息
4、浏览器打开,显示这个说明部署成功
5、 配置文件里文件存放位置自行修改
6、API
上传
请求:
url: Host + ‘/api/FileServer/upload’ 如: http://10.10.131.43:8002/api/FileServer/upload
method: 'post'
form-data: file: 选择的文件
返回:
{
"pathname": "2017/12/31/23c28cc8f93440be983e80ffa95d14e1.mpp",
(生成的唯一包含路径的文件名)
"title": "日程表.mpp",
(原文件名)
"size": 1542656,
文件大小(字节)
"createDate": "2017-01-17 10:12:10",
}
批量上传
请求:
url: Host + ‘/api/FileServer/batchUpload’ 如: http://10.10.131.43:8002/api/FileServer/batchUpload
method: 'post'
form-data: file: 选择的文件
返回:
[{
"pathname": "2017/12/31/23c28cc8f93440be983e80ffa95d14e1.mpp",
(生成的唯一包含路径的文件名)
"title": "日程表.mpp",
(原文件名)
"size": 1542656, 文件大小(字节)
"createDate": "2017-01-17 10:12:10",
},
{...}
]
===============================================================================================
下载
url: Host + '/api/FileServer/download/(filepathname)' 如:http://10.10.131.43:8002/api/FileServer/download/2018/01/26/df75b56acdcd4fed8c2356a358bf186f.jpg
method: 'get'
===============================================================================================
预览
url: Host + '/api/FileServer/view/(filepathname)' 如:http://10.10.131.43:8002/api/FileServer/view/2018/01/26/df75b56acdcd4fed8c2356a358bf186f.jpg
method: 'get'
===============================================================================================
删除
url: Host + '/api/FileServer/delete/(filepathname)' 如:http://10.10.131.43:8002/api/FileServer/delete/2018/01/26/df75b56acdcd4fed8c2356a358bf186f.jpg
method: 'post'
===============================================================================================
获取文件信息
url: Host + '/api/FileServer/(filepathname)' 如:http://10.10.131.43:8002/api/FileServer/2018/01/26/df75b56acdcd4fed8c2356a358bf186f.jpg
method: 'get'
返回:
{
"pathname": "2017/12/31/23c28cc8f93440be983e80ffa95d14e1.mpp",
(生成的唯一包含路径的文件名)
"title": "日程表.mpp",
(原文件名)
"size": 1542656,
文件大小(字节)
"createDate": "2017-01-17 10:12:10",
}
压缩下载多个文件
...