+2
-3
backend/src/backend/api/albums.py
+2
-3
backend/src/backend/api/albums.py
···
360
# save returns the file_id (hash)
361
image_id = await storage.save(image_obj, image.filename)
362
363
-
# construct R2 URL directly
364
-
# storage.save uses just {file_id}{ext} for images (no subdirectory)
365
-
image_url = f"{storage.public_image_bucket_url}/{image_id}{ext}"
366
367
# delete old image if exists (prevent R2 object leaks)
368
if album.image_id:
···
360
# save returns the file_id (hash)
361
image_id = await storage.save(image_obj, image.filename)
362
363
+
# construct R2 URL directly (images are stored under images/ prefix)
364
+
image_url = f"{storage.public_image_bucket_url}/images/{image_id}{ext}"
365
366
# delete old image if exists (prevent R2 object leaks)
367
if album.image_id: