Saving fixes to the hosted file delete function.
This commit is contained in:
@@ -458,7 +458,7 @@ async def upload_files(
|
||||
link_to_id_random = link_to_id_random,
|
||||
check_allowed_extension = check_allowed_extension,
|
||||
)
|
||||
|
||||
|
||||
hosted_file_id = None
|
||||
hosted_file_dict = {}
|
||||
|
||||
@@ -858,10 +858,11 @@ async def test_upload_files(
|
||||
async def delete_hosted_file(
|
||||
hosted_file_id: str = Path(min_length=11, max_length=22),
|
||||
|
||||
link_to_type: str = None,
|
||||
link_to_id: Union[int, str] = None,
|
||||
# These are needed to identify the hosted_file_link record to be deleted
|
||||
link_to_type: str = None, # Type of object the hosted file is linked to
|
||||
link_to_id: Union[int, str] = None, # ID of the object the hosted file is linked to
|
||||
|
||||
rm_orphan: bool = False,
|
||||
rm_orphan: bool = False, # Whether to remove orphaned files
|
||||
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user