Daniel Bedeleanu
ea49cd6e4a
feat(phase1): add image storage utilities
- Create backend/services/image_storage.py with 4 core functions:
- sanitize_filename(): remove unsafe chars, limit to 255 chars, convert to lowercase
- get_unique_filename(): handle collisions with UUID suffix (format: {name}_{uuid8}_{variant}.jpg)
- ensure_image_directories(): create /images/ root and category subdirs on startup
- save_image(): save bytes to /images/{category}/{filename}, returns relative path
- Create comprehensive test suite (22 tests) covering all functionality
- Integrate ensure_image_directories() into FastAPI startup event
- Directory structure: /images/{category}/{filename}
- Collision handling: auto-suffix with UUID if filename exists
- All tests passing, pathlib.Path for safe operations
2026-04-20 21:57:26 +03:00
..
2026-04-14 22:54:19 +03:00
2026-04-19 17:20:11 +03:00
2026-04-19 17:08:11 +03:00
2026-04-14 20:44:01 +03:00
2026-04-20 21:57:26 +03:00
2026-04-20 21:57:26 +03:00
2026-04-15 16:41:20 +03:00
2026-04-15 15:20:45 +03:00
2026-04-12 10:45:57 +03:00
2026-04-10 21:51:22 +03:00
2026-04-15 17:54:21 +03:00
2026-04-15 15:20:45 +03:00
2026-04-11 12:33:13 +03:00
2026-04-14 20:44:01 +03:00
2026-04-15 17:31:58 +03:00
2026-04-15 17:54:21 +03:00
2026-04-15 17:54:21 +03:00
2026-04-20 21:57:26 +03:00
2026-04-20 21:57:26 +03:00
2026-04-18 16:48:30 +00:00
2026-04-12 09:39:17 +03:00