# Research: File Storage Management & UI

**Decision**: Use Python's built-in `pathlib` and `shutil` for filesystem operations.
**Rationale**: Standard library, robust, cross-platform (though target is Linux), and sufficient for local file management. No external dependencies needed.
**Alternatives considered**: `os` module (lower level, less ergonomic), `pyfilesystem2` (external dependency, unnecessary overhead for simple local storage).

**Decision**: Use `pydantic` for configuration and file metadata models.
**Rationale**: Already used in the project, provides validation and serialization.

**Decision**: Use `multipart/form-data` for file uploads.
**Rationale**: Standard web practice for file uploads. FastAPI supports `UploadFile` natively.

**Decision**: Default storage path strategy.
**Rationale**: The default path will be `../ss-tools-storage` (relative to workspace root) or similar to ensure it sits outside the git repository by default, but allows configuration override.

**Decision**: Path Traversal Prevention.
**Rationale**: Will use `os.path.commonpath` or `pathlib.Path.resolve()` to strictly validate that any accessed file path is a child of the configured storage root.