sometimes urls are not decoded properly

This commit is contained in:
rimu 2024-06-14 16:39:59 +08:00
parent b1dab35d12
commit c9fa9a9748

View file

@ -981,6 +981,7 @@ def make_image_sizes_async(file_id, thumbnail_width, medium_width, directory):
if content_type_parts:
file_ext = '.' + content_type_parts[-1]
else:
file_ext = file_ext.replace('%3f', '?') # sometimes urls are not decoded properly
if '?' in file_ext:
file_ext = file_ext.split('?')[0]