This commit is contained in:
grossmj committed 2022-12-26 11:28:51 +08:00
1 parent 8ad7b3f613
commit 9a7b3bed25
3 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -70,7 +70,6 @@ async def upload_image(
current_user: schemas.User = Depends(get_current_active_user),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
install_appliances: Optional[bool] = False,
allow_raw_image: Optional[bool] = False
) -> schemas.Image:
"""
Upload an image.
@@ -91,6 +90,7 @@ async def upload_image(
raise ControllerBadRequestError(f"Image '{image_path}' already exists")
try:
allow_raw_image = Config.instance().settings.Server.allow_raw_images
image = await write_image(image_path, full_path, request.stream(), images_repo, allow_raw_image=allow_raw_image)
except (OSError, InvalidImageError, ClientDisconnect) as e:
raise ControllerError(f"Could not save image '{image_path}': {e}")