Showing
1 changed file
with
32 additions
and
3 deletions
1 | # 七牛云图片上传服务接口定义 | 1 | # 七牛云图片上传服务接口定义 |
2 | --------------------- | 2 | --------------------- |
3 | 3 | ||
4 | -# 七牛云图片上传服务接口 | 4 | +# 七牛云单图片上传服务接口 |
5 | 5 | ||
6 | > 接口名: `/fileupload/upload/` | 6 | > 接口名: `/fileupload/upload/` |
7 | 7 | ||
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | |属性名称|类型|例子|说明 | 12 | |属性名称|类型|例子|说明 |
13 | |--------|----|----|----| | 13 | |--------|----|----|----| |
14 | |file|file|-|图片文件 | 14 | |file|file|-|图片文件 |
15 | -|userId|string|54|用户id| | 15 | +|userId|string|54|用户id,可选| |
16 | |bucket|string|yhb-img02|bucket空间,可选(默认为yhb-img01)但值只能是yhb-img01或yhb-img02| | 16 | |bucket|string|yhb-img02|bucket空间,可选(默认为yhb-img01)但值只能是yhb-img01或yhb-img02| |
17 | 17 | ||
18 | --------------------- | 18 | --------------------- |
@@ -22,9 +22,38 @@ | @@ -22,9 +22,38 @@ | ||
22 | ``` json | 22 | ``` json |
23 | { | 23 | { |
24 | "code": 200, | 24 | "code": 200, |
25 | - "data": "http://yhfair.qiniudn.com/yhb-img01/2016/02/16/22/01575e9f268f8e9f2357a6105f0e707536.png", | 25 | + "data": "http://img12.static.yhbimg.com/yhb-img02/2016/03/02/13/026d908d827073f8dea47f0abe12a2ab6e.jpg", |
26 | + "md5": null, | ||
26 | "message": "上传成功" | 27 | "message": "上传成功" |
27 | } | 28 | } |
28 | 29 | ||
29 | ``` | 30 | ``` |
31 | +# 七牛云多图片上传服务接口 | ||
32 | +> 接口名: `/fileupload/uploads/` | ||
30 | 33 | ||
34 | + | ||
35 | +### 入参 | ||
36 | + | ||
37 | +------------------------- | ||
38 | +|属性名称|类型|例子|说明 | ||
39 | +|--------|----|----|----| | ||
40 | +|files|file|-|图片文件 | ||
41 | +|userId|string|54|用户id,可选| | ||
42 | +|bucket|string|yhb-img02|bucket空间,可选(默认为yhb-img01)但值只能是yhb-img01或yhb-img02| | ||
43 | + | ||
44 | +--------------------- | ||
45 | + | ||
46 | +### 返回 | ||
47 | + | ||
48 | +``` json | ||
49 | +{ | ||
50 | + "code": 200, | ||
51 | + "data": [ | ||
52 | + "http://img12.static.yhbimg.com/yhb-img02/2016/03/02/13/0242d68721d495b840c839f0752d6d0f04.jpg", | ||
53 | + "http://img12.static.yhbimg.com/yhb-img02/2016/03/02/13/028a89d0a3124ed57637c5098a5e2e4574.jpg" | ||
54 | + ], | ||
55 | + "md5": null, | ||
56 | + "message": "上传成功" | ||
57 | +} | ||
58 | + | ||
59 | +``` |
-
Please register or login to post a comment