Removed useless comments and imports
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user