add files router and update image URL path

This commit is contained in:
2025-08-11 16:13:01 +03:00
parent d25280f368
commit 81a2d1036b
3 changed files with 25 additions and 2 deletions

View File

@ -32,7 +32,7 @@ async def upload_product_image(
with open(file_path, "wb") as file:
file.write(await upload_file.read())
image_url = f"{str(request.base_url).rstrip('/')}/api/files/images/{filename}"
image_url = f"{str(request.base_url).rstrip('/')}/api/v1/files/images/{filename}"
return response({
"imageUrl": image_url,
"message": "Фото успешно загружено!",