Loading app/controller/about.py +5 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,11 @@ def upload_about_picture(id): return jsonify({"error": "you have to provide a picture"}), 400 file = request.files["file"] # Check if the file is an image if not file.mimetype.startswith("image/"): return jsonify({"error": "The uploaded file must be an image"}), 400 unique_filename = get_unique_filename( current_app.config["LOGO_DIR"], file.filename ) Loading app/controller/experience.py +5 −0 Original line number Diff line number Diff line Loading @@ -393,6 +393,11 @@ def upload_experience_logo(id): return jsonify({"error": "you have to provide a logo"}), 400 file = request.files["file"] # Check if the file is an image if not file.mimetype.startswith("image/"): return jsonify({"error": "The uploaded file must be an image"}), 400 unique_filename = get_unique_filename( current_app.config["LOGO_DIR"], file.filename ) Loading app/controller/service.py +5 −0 Original line number Diff line number Diff line Loading @@ -345,6 +345,11 @@ def upload_service_logo(id): return jsonify({"error": "you have to provide a logo"}), 400 file = request.files["file"] # Check if the file is an image if not file.mimetype.startswith("image/"): return jsonify({"error": "The uploaded file must be an image"}), 400 unique_filename = get_unique_filename( current_app.config["LOGO_DIR"], file.filename ) Loading Loading
app/controller/about.py +5 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,11 @@ def upload_about_picture(id): return jsonify({"error": "you have to provide a picture"}), 400 file = request.files["file"] # Check if the file is an image if not file.mimetype.startswith("image/"): return jsonify({"error": "The uploaded file must be an image"}), 400 unique_filename = get_unique_filename( current_app.config["LOGO_DIR"], file.filename ) Loading
app/controller/experience.py +5 −0 Original line number Diff line number Diff line Loading @@ -393,6 +393,11 @@ def upload_experience_logo(id): return jsonify({"error": "you have to provide a logo"}), 400 file = request.files["file"] # Check if the file is an image if not file.mimetype.startswith("image/"): return jsonify({"error": "The uploaded file must be an image"}), 400 unique_filename = get_unique_filename( current_app.config["LOGO_DIR"], file.filename ) Loading
app/controller/service.py +5 −0 Original line number Diff line number Diff line Loading @@ -345,6 +345,11 @@ def upload_service_logo(id): return jsonify({"error": "you have to provide a logo"}), 400 file = request.files["file"] # Check if the file is an image if not file.mimetype.startswith("image/"): return jsonify({"error": "The uploaded file must be an image"}), 400 unique_filename = get_unique_filename( current_app.config["LOGO_DIR"], file.filename ) Loading