Files
romm/backend/tests/endpoints
TowyTowy 36ee1dc0cc fix(states): repoint the row when a re-upload changes emulator
POST /api/states is a filename upsert: get_state_by_filename matches on
(rom_id, user_id, file_name) with no emulator scoping, while the bytes are
written under a path derived from this request's emulator. The upsert branch
only wrote file_size_bytes, so re-uploading the same filename under a
different emulator left the row pointing at the previous emulator's folder
while reporting the new file's size. GET /api/states/{id}/content then served
the old state, and the freshly written bytes were orphaned on disk.

Persist file_path/emulator alongside the size, and drop the bytes at the old
location when no other row still references them. This mirrors the fix
already applied to POST /api/saves in #3833.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-04 20:05:03 +02:00
..
2026-03-14 23:56:46 -04:00
2026-08-01 15:10:56 -04:00
2026-06-21 17:42:25 -04:00
2026-07-01 08:58:00 -04:00
2026-03-14 23:56:46 -04:00