format
This commit is contained in:
parent
65773b424f
commit
1726561f39
159 changed files with 582 additions and 588 deletions
|
|
@ -110,7 +110,7 @@ async def download_profile_picture(
|
|||
extension = file_name.split(".")[-1]
|
||||
config_dir = get_storage_service().settings_service.settings.config_dir
|
||||
config_path = Path(config_dir)
|
||||
folder_path = config_path / 'profile_pictures' / folder_name
|
||||
folder_path = config_path / "profile_pictures" / folder_name
|
||||
content_type = build_content_type_from_extension(extension)
|
||||
file_content = await storage_service.get_file(flow_id=folder_path, file_name=file_name)
|
||||
return StreamingResponse(BytesIO(file_content), media_type=content_type)
|
||||
|
|
@ -140,7 +140,6 @@ async def list_profile_pictures(storage_service: StorageService = Depends(get_st
|
|||
raise HTTPException(status_code=500, detail=str(e))
|
||||
|
||||
|
||||
|
||||
@router.get("/list/{flow_id}")
|
||||
async def list_files(
|
||||
flow_id: UUID = Depends(get_flow_id), storage_service: StorageService = Depends(get_storage_service)
|
||||
|
|
|
|||
|
|
@ -20,4 +20,4 @@ def generate_unique_folder_name(folder_name, user_id, session):
|
|||
|
||||
# If a folder with the name already exists, append (n) to the name and increment n
|
||||
folder_name = f"{original_name} ({n})"
|
||||
n += 1
|
||||
n += 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue