协作系统-上传媒体资源
<h1>上传媒体资源</h1>
<h2><strong>请求URL:</strong></h2>
<ul>
<li>
<p>前缀
TEST:<a href="https://guide-api-test.feihe.com">https://guide-api-test.feihe.com</a>
UAT:<a href="https://guide-api-uat.feihe.com">https://guide-api-uat.feihe.com</a>
PROD:<a href="https://guide-api.feihe.com">https://guide-api.feihe.com</a></p>
</li>
<li>地址
/wisdom-api/weixin/v1/uploadMedia</li>
</ul>
<h2><strong>请求方式:</strong></h2>
<p>POST</p>
<h2><strong>请求头:</strong></h2>
<ul>
<li>system: NEW_MEMBER</li>
<li>Content-Type multipart/form-data;</li>
</ul>
<h2><strong>请求参数:</strong></h2>
<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;">file</td>
<td>文件(binary)</td>
</tr>
</tbody>
</table>
<h2>成功返回结果example</h2>
<pre><code>{
&quot;msg&quot;: &quot;操作成功&quot;,
&quot;code&quot;: 200,
&quot;data&quot;: {
&quot;mediaId&quot;: &quot;5dGG0vNr1wA2ctUbwU2txDKlQCbGOXnvGo9Ujmkj0vWxHPxRhlJ7J6W1ss-j7fCl&quot;,
&quot;url&quot;: &quot;http://mmbiz.qpic.cn/sz_mmbiz_png/fCjCnn2YtxiaaLTpeU9kxSoX06tyy5nmReYbKqe0G4icMQ2JVIZ8Cb4MZrgwiaCiblGHzX3bpuiaiaYZxgiaxKonHrLKQ/0?wx_fmt=png&quot;,
&quot;errCode&quot;: null,
&quot;errMsg&quot;: null
}
}</code></pre>
<h2>失败结果example</h2>
<pre><code>{
&quot;code&quot;: 402,
&quot;msg&quot;: &quot;xxxxx&quot;,
&quot;data&quot;: {
&quot;errcode&quot;: 40003,
&quot;errmsg&quot;: &quot;invalid openid rid: 660ce9a1-6a69eebc-66b4caac&quot;
}
}</code></pre>
<h2><strong>返回结果:</strong></h2>
<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;">mediaId</td>
<td style="text-align: left;">string</td>
<td>微信媒体id|</td>
</tr>
<tr>
<td style="text-align: left;">url</td>
<td style="text-align: left;">string</td>
<td>预览链接|</td>
</tr>
</tbody>
</table>