Skip to content

Commit 0567ea9

Browse files
committed
Use image.filename directly
1 parent b93bac4 commit 0567ea9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ def capture_async(
3737
fcm_registration_token: Annotated[str, Form()],
3838
to_play: Annotated[Color, Form()] = Color.BLACK,
3939
):
40-
filename = Path(image.filename)
41-
output_path = settings.IMAGES_DIR / filename
40+
output_path = settings.IMAGES_DIR / image.filename
4241
with output_path.open("wb") as output_file:
4342
output_file.write(image.file.read())
4443
process_image_task.delay(

0 commit comments

Comments
 (0)