mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
remove '?asdf' stuff on the end of file names when saving
This commit is contained in:
parent
f5f5f593a5
commit
5808301770
1 changed files with 3 additions and 0 deletions
|
@ -704,6 +704,9 @@ def make_image_sizes_async(file_id, thumbnail_width, medium_width, directory):
|
|||
content_type_parts = content_type.split('/')
|
||||
if content_type_parts:
|
||||
file_ext = '.' + content_type_parts[-1]
|
||||
else:
|
||||
if '?' in file_ext:
|
||||
file_ext = file_ext.split('?')[0]
|
||||
|
||||
new_filename = gibberish(15)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue