adjust max filename length
This commit is contained in:
parent
c1a2084d7c
commit
265471864f
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue