diff --git a/app/routers/event_file.py b/app/routers/event_file.py index aa16fa9..2e45a6f 100644 --- a/app/routers/event_file.py +++ b/app/routers/event_file.py @@ -239,7 +239,7 @@ async def event_file_lookup( @router.get('/event/file/{event_file_id}/download', response_model=Resp_Body_Base) async def download_event_file( event_file_id: str = Path(min_length=11, max_length=22), - filename: str = Query(None, min_length=4, max_length=100), + filename: str = Query(None, min_length=4, max_length=255), streaming: bool = False, commons: Common_Route_Params = Depends(common_route_params), diff --git a/app/routers/hosted_file.py b/app/routers/hosted_file.py index 5b4dbc4..64f8e4d 100644 --- a/app/routers/hosted_file.py +++ b/app/routers/hosted_file.py @@ -161,7 +161,7 @@ async def directory_check( @router.get('/{hosted_file_id}/download', response_model=Resp_Body_Base) async def download_hosted_file( hosted_file_id: str = Path(min_length=11, max_length=22), - filename: str = Query(None, min_length=4, max_length=100), + filename: str = Query(None, min_length=4, max_length=255), # streaming: bool = False, commons: Common_Route_Params = Depends(common_route_params), @@ -248,7 +248,7 @@ async def file_streamer(path: str, start: int, end: int): @router.get('/{hosted_file_id}/stream') async def stream_hosted_file( hosted_file_id: str = Path(min_length=11, max_length=22), - filename: str = Query(None, min_length=4, max_length=100), + filename: str = Query(None, min_length=4, max_length=255), # streaming: bool = True, range: str = Header(), @@ -956,7 +956,7 @@ async def check_hosted_file_obj_w_hash( @router.get('/tmp/{subdirectory}/{filename}/download', response_model=Resp_Body_Base) async def download_tmp( subdirectory: str = Path(min_length=1, max_length=100), - filename: str = Path(min_length=4, max_length=120), + filename: str = Path(min_length=4, max_length=255), commons: Common_Route_Params = Depends(common_route_params), ): @@ -1002,7 +1002,7 @@ async def convert_file( link_to_id: str = Query(..., min_length=11, max_length=22), # filename: str = Query('automatic_pdf_to_img_conversion.webp', min_length=2, max_length=150), - filename_no_ext: str = Query('automated_hosted_file_conversion', min_length=1, max_length=150), + filename_no_ext: str = Query('automated_hosted_file_conversion', min_length=1, max_length=240), # Intentionally below 255 characters to account for the extension # extension: str = Query('webp', min_length=1, max_length=15), from_type: str = 'pdf', diff --git a/app/routers/qr.py b/app/routers/qr.py index aaa4ba3..e1d54ff 100644 --- a/app/routers/qr.py +++ b/app/routers/qr.py @@ -28,7 +28,7 @@ async def get_qr( account_id: str = Path(min_length=11, max_length=22), regen: bool = False, qr_type: str = Query(None, min_length=1, max_length=10), - filename: str = Query(None, min_length=4, max_length=100), + filename: str = Query(None, min_length=4, max_length=255), n: str = Query('', max_length=100), fn: str = Query('', max_length=100),