差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 后一修订版 两侧同时换到之后的修订记录 | ||
im:server:basics:fileoperation [2019/03/14 04:36] jk [下载缩略图] |
im:server:basics:fileoperation [2019/06/14 09:09] jk [下载缩略图] |
||
---|---|---|---|
行 46: | 行 46: | ||
<code php> | <code php> | ||
- | curl -X POST -H 'Content-Type: multipart/form-data' -H 'Accept: application/json' -H 'Authorization: Bearer YWMtVVK6cPFqEeif2wnxtHDB7AAAAAAAAAAAAAAAAAAAAAGL4CTw6XgR6LaXXVmNX4QCAgMAAAFnT6x89wBPGgCnBeC15W5VAU5kW2f80QS3_SQSnbEjyOtg8XCcmkvUXw' -H 'restrict-access: true' {"type":"formData"} 'http://a1.easemob.com/easemob-demo/testapp/chatfiles' | + | curl -X POST https://a1.easemob.com/easemob-demo/testapp/chatfiles -H 'Authorization: Bearer YWMtS1pRuFa-EemixAMhJgmGUAAAAAAAAAAAAAAAAAAAAAGL4CTw6XgR6LaXXVmNX4QCAgMAAAFp57yd7QBPGgDNLstNggrzgHV3JAbqbznTptqLhpG0fTOCaBFJZgduZA' -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' -H 'restrict-access: true' -F file=@/Users/test/9.2/Easemob/image/IMG_2953.JPG |
</code> | </code> | ||
+ | |||
+ | **注意:**上述请求示例中''-F file=@/Users/test/9.2/Easemob/image/IMG_2953.JPG'',为环信本地文件路径,使用时请替换为自己的文件路径,否则会请求失败。 | ||
=== 可能返回的结果示例 === | === 可能返回的结果示例 === | ||
行 55: | 行 57: | ||
<code json> | <code json> | ||
{ | { | ||
- | "action": "post", | + | "action": "post", |
- | "application": "8be024f0-e978-11e8-b697-5d598d5f8402", | + | "application": "8be024f0-e978-11e8-b697-5d598d5f8402", |
- | "path": "/chatfiles", | + | "path": "/chatfiles", |
- | "uri": "https://a1.easemob.com/easemob-demo/testapp/chatfiles", | + | "uri": "https://a1.easemob.com/easemob-demo/testapp/chatfiles", |
- | "entities": [ | + | "entities": [ |
- | { | + | { |
- | "uuid": "c66b80da-f236-11e8-b6f2-dd847737923d", | + | "uuid": "5fd74830-56be-11e9-822a-81ea50bb049d", |
- | "type": "chatfile", | + | "type": "chatfile", |
- | "share-secret": "xmuA5PI2Eei2FcUwVDtPJq_KPZcLUgikAu_GTRBgW9AFgmOn" | + | "share-secret": "X9dIOla-EemnFYUgtUZLGyqG9Y-S01eL_ysw27NqTV1_g7Yc" |
- | } | + | } |
- | ], | + | ], |
- | "timestamp": 1543317770592, | + | "timestamp": 1554371126338, |
- | "duration": 0, | + | "duration": 0, |
- | "organization": "easemob-demo", | + | "organization": "easemob-demo", |
- | "applicationName": "testapp" | + | "applicationName": "testapp" |
} | } | ||
</code> | </code> | ||
行 186: | 行 188: | ||
<WRAP half column> | <WRAP half column> | ||
- | 下一页:[[im:server:basics:recordfiledownload|实时音视频录制]] | + | 下一页:[[im:server:basics:conferencemanage|会议管理]] |
</WRAP> | </WRAP> | ||
</WRAP> | </WRAP> |