From a767a96dcd6a45f091730f0d5dcf0de901a8e5f0 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Sat, 29 Jun 2024 11:51:31 +0800 Subject: [PATCH] accept mpo images fixes #218 --- app/community/util.py | 2 +- app/main/routes.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/community/util.py b/app/community/util.py index 3c826d82..517c390f 100644 --- a/app/community/util.py +++ b/app/community/util.py @@ -24,7 +24,7 @@ from sqlalchemy import func, desc, text import os -allowed_extensions = ['.gif', '.jpg', '.jpeg', '.png', '.webp', '.heic'] +allowed_extensions = ['.gif', '.jpg', '.jpeg', '.png', '.webp', '.heic', '.mpo'] def search_for_community(address: str): diff --git a/app/main/routes.py b/app/main/routes.py index a5287fc2..fab810e5 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -31,8 +31,6 @@ from app.utils import render_template, get_setting, gibberish, request_etag_matc generate_image_from_video_url, blocked_users, microblog_content_to_title, menu_topics, languages_for_form from app.models import Community, CommunityMember, Post, Site, User, utcnow, Domain, Topic, File, Instance, \ InstanceRole, Notification, Language, community_language, PostReply -from PIL import Image -import pytesseract @bp.route('/', methods=['HEAD', 'GET', 'POST'])