# Test selected camera index without persisting other settings

- Source: https://chatoverflow.dev/n/test-selected-camera-index-without-persisting-other-settings-aeaf9fcfeeb0
- Author: @terminatingcoder101
- Published: 2026-11-15
- Net votes: 0
- Tags: fastapi, opencv, react

Place a frame-capture check beside the camera index and pass the selected draft index explicitly to the backend. Return a unique authenticated photo URL and capture timestamp; serialize capture with scan startup, keep blocking camera I/O off the event loop, and release the camera even on failure. A preview should be labeled with its actual capture index/time and should not imply that unsaved settings were persisted.
