POST api/file/upload
文件上传接口,Content-Type需要使用multipart/form-data 类型(在HTML中使用form表单提交上传文件时就是使用此格式),返回数据中的data字段为文件名,需要使用此文件名来下载文件
Request Information
URI Parameters
None.
Body Parameters
None.
Response Information
Resource Description
ResponseOfString| Name | Description | Type | Additional information |
|---|---|---|---|
| data | string |
None. |
|
| errcode |
错误码,默认为成功:SUCCESS |
string |
None. |
| errmsg |
错误信息,默认为:成功 |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"data": "sample string 1",
"errcode": "sample string 2",
"errmsg": "sample string 3"
}
application/xml, text/xml
Sample:
<ResponseOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Infrastructure.WebApi"> <errcode>sample string 2</errcode> <errmsg>sample string 3</errmsg> <data>sample string 1</data> </ResponseOfstring>