1 Star 0 Fork 0

陈狗翔 / writing

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
image_server.py 414 Bytes
一键复制 编辑 原始数据 按行查看 历史
# encoding:utf8
__author__ = 'sijiu'
from flask import Response, Flask, request
app = Flask(__name__)
@app.route("/image", methods=['post', 'get'])
def index():
path = request.args.get('path')
print(path)
path = "E:/image_server/%s" % path
resp = Response(open(path, 'rb'), mimetype="image/png;image/jpeg;image/x-ms-bmp;image/gif")
return resp
app.run(host='0.0.0.0',port=4949, debug=True)
JavaScript
1
https://gitee.com/ChenGouXiang/writing.git
git@gitee.com:ChenGouXiang/writing.git
ChenGouXiang
writing
writing
master

搜索帮助