mirror of
https://github.com/ivanch/tcc.git
synced 2025-08-25 15:21:49 +00:00
Add load image, Dockerfile e requirements
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import io
|
||||
from services.image import ImageService
|
||||
from static.image_helper import ImageHelper
|
||||
from flask import request, Response, Blueprint, jsonify, send_file
|
||||
@@ -18,20 +17,25 @@ def blur_image():
|
||||
as_attachment=True,
|
||||
download_name='blurred_image.jpeg')
|
||||
|
||||
return jsonify(status=400, message="Bad request")
|
||||
return "Bad request", 400
|
||||
|
||||
|
||||
@image_blueprint.route('/image/load-image', methods=['POST'])
|
||||
@image_blueprint.route('/image/load-small-image', methods=['GET'])
|
||||
def get_simple_image():
|
||||
pass
|
||||
return send_file(image_service.get_simple_image(),
|
||||
mimetype='image/png',
|
||||
as_attachment=True,
|
||||
download_name='small-image.png')
|
||||
|
||||
|
||||
@image_blueprint.route('/image/load-big-image', methods=['GET'])
|
||||
def get_big_image():
|
||||
pass
|
||||
return send_file(image_service.get_big_image(),
|
||||
mimetype='image/png',
|
||||
as_attachment=True,
|
||||
download_name='big-image.png')
|
||||
|
||||
|
||||
@image_blueprint.route('/image/save-big-image', methods=['POST'])
|
||||
def save_big_image():
|
||||
def save_image():
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user