Removed useless comments and imports

This commit is contained in:
2023-02-16 15:50:02 +01:00
parent 3520912aae
commit fe2ef49c74
3 changed files with 4 additions and 29 deletions

View File

@@ -36,8 +36,6 @@ async def compress_image(image_path: str):
size_before = path.getsize(image_path) / 1024
# system(f"exiftool -overwrite_original -all:all= -tagsFromFile @ -exif:Orientation {image_path}")
if image_type == "image/jpeg":
task = Thread(target=system, kwargs={"command": f'jpegoptim "{image_path}" -o --max=55 -p --strip-none'})
elif image_type == "image/png":
@@ -73,10 +71,6 @@ async def photo_upload(file: UploadFile, album: str, ignore_duplicates: bool = F
if col_albums.find_one( {"user": current_user.user, "name": album} ) is None:
raise AlbumNameNotFoundError(album)
# raise HTTPException(status_code=HTTP_404_NOT_FOUND, detail=f"Provided album '{album}' does not exist.")
# if not file.content_type.startswith("image"):
# raise HTTPException(status_code=HTTP_406_NOT_ACCEPTABLE, detail="Provided file is not an image, not accepting.")
makedirs(path.join("data", "users", current_user.user, "albums", album), exist_ok=True)