zip_upload_foreign.js
2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
 * @api {post} /DocSharing/zipUploadForeign 35.zip上传
 * @apiName zipUploadForeign
 * @apiGroup doc
 * @apiVersion 2.0.0
 * @apiDescription zip文档上传,特定的zip,转换动态 PPT 生成的压缩包。 <br/>
 * 支持最多10个文档同时上传。<br/>
 * 支持类型:zip。<br/>
 * 文件大小不能超过50M。<br/>
 * 需要用到接口 <b>21</b> 中得到的文档服务器地址。
 *
 * @apiParam {String} siteId 站点标识
 * @apiParam {Long} timestamp 时间戳
 * @apiParam {String} authId MD5(key+siteId+timestamp), 其中 key 为与系统约定的加密 key
 * @apiParam {String} createUserID 上传者 id
 * @apiParam {String} createUserName 上传者名字
 *
 * @apiParamExample {form-data} 请求示例
 <html>
 <body>
 上传文件程序应用示例
 <form action="zipUploadForeign" method="post" enctype="multipart/form-data">
 请选择要上传的文件<input type="file" name="upfile" size="50">
 siteID:<input type="text" name="siteID" size="50" value="admin">
 timestamp:<input type="text" name="timestamp" size="50" value="1442286924284">
 authId:<input type="text" name="authId" size="50" value="68e150f469667a9972b7f82bc6ec0877">
 createUserID:<input type="text" name="createUserID" size="50" value="402880f44fa5bcac014fa5dff5330001">
 createUserName:<input type="text" name="createUserName" size="50" value="admin">
 <input type="submit" value="提交">
 </form>
 </body>
 </html>
 *
 * @apiSuccess {int} errorCode
 * 0:成功 <br/>
 * 1:不是上传请求 <br/>
 * 3:请求格式错误 <br/>
 * 5:siteId 不能为空 <br/>
 * 6:authId 错误 <br/>
 * 7:格式不正确,不是 zip <br/>
 * 10:保存失败 <br/>
 * 11:解压失败 <br/>
 * 12:未在包中找到 index.html <br/>
 * @apiSuccess {Array} files
 * @apiSuccess {String} files.docId 文档 id
 * @apiSuccess {String} files.docName 文档名称
 *
 * @apiSuccessExample {json} 返回示例
 {"files":[{"fileName":"测试.zip","docId":"40285d385c42d956015c42d9ddf60001"},{"fileName":"城市6.zip","docId":"40285d385c42d956015c42d9e0530002"}],"code":0}
 *
 */