adjust max filename length

This commit is contained in:
Cyberes 2024-04-03 23:26:45 -06:00
parent c1a2084d7c
commit 265471864f
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ async def upload_to_r2(source_file: Union[str, Path], destination_file: str, buc
return await bucket.upload_fileobj(f, destination_file) return await bucket.upload_fileobj(f, destination_file)
def trim_filename(filename, max_length=200): def trim_filename(filename, max_length=230):
extension = os.path.splitext(filename)[1] extension = os.path.splitext(filename)[1]
max_length -= len(extension) max_length -= len(extension)
if len(filename) > max_length: if len(filename) > max_length: