上传文件(MultipartFile)
<h5>请求URL</h5>
<ul>
<li><code>http://IP:端口号/file/upload</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>POST</li>
</ul>
<h3>请求参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>位置</th>
<th>类型</th>
<th>必选</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>token</td>
<td>header</td>
<td>string</td>
<td>否</td>
<td>none</td>
</tr>
<tr>
<td>body</td>
<td>body</td>
<td>object</td>
<td>否</td>
<td>none</td>
</tr>
<tr>
<td>» file</td>
<td>body</td>
<td>string(binary)</td>
<td>是</td>
<td>文件对象</td>
</tr>
</tbody>
</table>
<p>> 返回示例</p>
<p>> 成功</p>
<pre><code class="language-json">{
&quot;code&quot;: 0,
&quot;data&quot;: {
&quot;bizType&quot;: &quot;&quot;,
&quot;fileType&quot;: &quot;&quot;,
&quot;storageType&quot;: &quot;&quot;,
&quot;bucket&quot;: &quot;&quot;,
&quot;path&quot;: &quot;&quot;,
&quot;url&quot;: &quot;&quot;,
&quot;uniqueFileName&quot;: &quot;&quot;,
&quot;fileMd5&quot;: &quot;&quot;,
&quot;originalFileName&quot;: &quot;&quot;,
&quot;contentType&quot;: &quot;&quot;,
&quot;suffix&quot;: &quot;&quot;,
&quot;size&quot;: 0,
&quot;id&quot;: 0
},
&quot;msg&quot;: &quot;&quot;,
&quot;path&quot;: &quot;&quot;,
&quot;extra&quot;: {
&quot;{}&quot;: {}
},
&quot;timestamp&quot;: 0,
&quot;errorMsg&quot;: &quot;&quot;
}</code></pre>
<h3>返回结果</h3>
<table>
<thead>
<tr>
<th>状态码</th>
<th>状态码含义</th>
<th>说明</th>
<th>数据模型</th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td><a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">OK</a></td>
<td>成功</td>
<td>Inline</td>
</tr>
</tbody>
</table>
<h3>返回数据结构</h3>
<p>状态码 <strong>200</strong></p>
<p><em>R<FileResultVO> 返回值</em></p>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>约束</th>
<th>中文名</th>
<th>说明</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<h1>数据模型</h1>
<p><h2 id="tocS_R«FileResultVO»">R«FileResultVO»</h2></p>
<p><a id="schemar«fileresultvo»"></a>
<a id="schema_R«FileResultVO»"></a>
<a id="tocSr«fileresultvo»"></a>
<a id="tocsr«fileresultvo»"></a></p>
<pre><code class="language-json">{
&quot;code&quot;: 0,
&quot;data&quot;: {
&quot;bizType&quot;: &quot;string&quot;,
&quot;fileType&quot;: &quot;IMAGE&quot;,
&quot;storageType&quot;: &quot;LOCAL&quot;,
&quot;bucket&quot;: &quot;string&quot;,
&quot;path&quot;: &quot;string&quot;,
&quot;url&quot;: &quot;string&quot;,
&quot;uniqueFileName&quot;: &quot;string&quot;,
&quot;fileMd5&quot;: &quot;string&quot;,
&quot;originalFileName&quot;: &quot;string&quot;,
&quot;contentType&quot;: &quot;string&quot;,
&quot;suffix&quot;: &quot;string&quot;,
&quot;size&quot;: 0,
&quot;id&quot;: 0
},
&quot;msg&quot;: &quot;ok&quot;,
&quot;path&quot;: &quot;string&quot;,
&quot;extra&quot;: {
&quot;{}&quot;: {}
},
&quot;timestamp&quot;: &quot;System.currentTimeMillis()&quot;,
&quot;errorMsg&quot;: &quot;string&quot;
}
</code></pre>
<h3>属性</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>约束</th>
<th>中文名</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>integer</td>
<td>false</td>
<td>none</td>
<td>调用是否成功标识,0:成功,-1:系统繁忙,此时请开发者稍候再试 详情见[ExceptionCode]<br />响应编码:0/200-请求处理成功</td>
</tr>
<tr>
<td>data</td>
<td><a href="#schemafileresultvo">FileResultVO</a></td>
<td>false</td>
<td>none</td>
<td>调用结果<br />响应数据</td>
</tr>
<tr>
<td>msg</td>
<td>string</td>
<td>false</td>
<td>none</td>
<td>结果消息,如果调用成功,消息通常为空T<br />提示消息</td>
</tr>
<tr>
<td>path</td>
<td>string</td>
<td>false</td>
<td>none</td>
<td>请求路径</td>
</tr>
<tr>
<td>extra</td>
<td><a href="#schemamap%c2%abobject%c2%bb">Map«Object»</a></td>
<td>false</td>
<td>none</td>
<td>附加数据<br />附加数据</td>
</tr>
<tr>
<td>timestamp</td>
<td>integer</td>
<td>false</td>
<td>none</td>
<td>响应时间<br />响应时间戳</td>
</tr>
<tr>
<td>errorMsg</td>
<td>string</td>
<td>false</td>
<td>none</td>
<td>系统报错时,抛出的原生信息<br />异常消息</td>
</tr>
</tbody>
</table>
<h4>枚举值</h4>
<table>
<thead>
<tr>
<th>属性</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>fileType</td>
<td>IMAGE</td>
</tr>
<tr>
<td>fileType</td>
<td>VIDEO</td>
</tr>
<tr>
<td>fileType</td>
<td>AUDIO</td>
</tr>
<tr>
<td>fileType</td>
<td>DOC</td>
</tr>
<tr>
<td>fileType</td>
<td>OTHER</td>
</tr>
<tr>
<td>storageType</td>
<td>LOCAL</td>
</tr>
<tr>
<td>storageType</td>
<td>FAST_DFS</td>
</tr>
<tr>
<td>storageType</td>
<td>MIN_IO</td>
</tr>
<tr>
<td>storageType</td>
<td>ALI_OSS</td>
</tr>
<tr>
<td>storageType</td>
<td>QINIU_OSS</td>
</tr>
<tr>
<td>storageType</td>
<td>HUAWEI_OSS</td>
</tr>
</tbody>
</table>