def get_images():
image_path = request.query.get('path',None)
if os.path.exists(image_path):
data = open(image_path,'rb').read()
response.set_header('Content-type', 'image/jpeg')
return data
else:
HTTPResponse(status=404,body=json.dumps({'error' : 'image not found'}))
#------------------
# MAIN
#------------------
评论列表
文章目录