图片服务器
$ git clone https://github.com/yue-best-practices/image-service.git
$ cd image-service
$ make docker
$ make clean
修改docker-compose.yml
文件,配置服务启动端口APP_PORT
以及图片存储路径IMAGE_PATH
$ make run
$ make stop
Url: /upload
Method: POST
Headers:
key | value |
---|---|
Content-Type | multipart/form-data |
Body:
key | type |
---|---|
image |
File image file (jpg /jepg /gif /png ) |
{
"code": 200,
"data": {
"image": "MjAxOS8wMi8xMC9hM2IwMjgxY2IyNGE0ZDA3OGNmNjYzMjBjMGI1NGYzOS5naWY="
},
"msg": "Success"
}
Url: /:image
(上传图片接口返回的image
值)
Method: GET