accept mpo images fixes #218

This commit is contained in:
rimu 2024-06-29 11:51:31 +08:00
parent 45e1ed2875
commit a767a96dcd
2 changed files with 1 additions and 3 deletions

View file

@ -24,7 +24,7 @@ from sqlalchemy import func, desc, text
import os 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): def search_for_community(address: str):

View file

@ -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 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, \ from app.models import Community, CommunityMember, Post, Site, User, utcnow, Domain, Topic, File, Instance, \
InstanceRole, Notification, Language, community_language, PostReply InstanceRole, Notification, Language, community_language, PostReply
from PIL import Image
import pytesseract
@bp.route('/', methods=['HEAD', 'GET', 'POST']) @bp.route('/', methods=['HEAD', 'GET', 'POST'])