webapi

上课练习接口


文件上传

<p><strong>简要描述:</strong> </p> <ul> <li>文件上传接口</li> </ul> <p><strong>请求URL:</strong> </p> <ul> <li><code>http://128.1.184.228/api/upload</code></li> </ul> <p><strong>请求方式:</strong></p> <ul> <li>POST </li> </ul> <p><strong>参数:</strong> </p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">file</td> <td style="text-align: left;">是</td> <td style="text-align: left;">binary</td> <td>上传文件字节流</td> </tr> </tbody> </table> <p><strong>返回示例</strong></p> <pre><code> { &amp;quot;code&amp;quot;: 0, &amp;quot;msgcode&amp;quot;: 200, &amp;quot;msg&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;name&amp;quot;: &amp;quot;166040868810000.jpg&amp;quot;, &amp;quot;url&amp;quot;:&amp;quot;20220813/166040868810000.jpg&amp;quot; }, &amp;quot;count&amp;quot;: 0 }</code></pre> <p><strong>返回参数说明</strong> </p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">name</td> <td style="text-align: left;">String</td> <td>返回数值:上传后的文件名称</td> </tr> <tr> <td style="text-align: left;">url</td> <td style="text-align: left;">String</td> <td>返回数值:上传后的文件路径</td> </tr> </tbody> </table> <p><strong>备注</strong> </p> <ul> <li>上传后访问地址:<a href="http://128.1.184.228:8092/uploads/">http://128.1.184.228:8092/uploads/</a></li> <li>更多返回错误代码请看首页的错误代码描述</li> </ul>

页面列表

ITEM_HTML