/** * AI Software Factory — E2E: Files & Uploads (Phase 9, TASK-0103) * * Covers the real Phase-9 presigned contract (see docs/api/files.md §8): * * 1. image upload through the UI file-picker block (the hidden * `[data-testid="file-input"]`) → the block re-renders in place with the * image (the picker block uploads its first file onto itself, * `updateBlockId`). * 2. PDF uploaded via the API + attached to a file block → renders the * preview iframe. * 3. oversized file (declared size above the plan limit) → rejected at * session creation with `FILE_TOO_LARGE` 413. * 4. MIME spoof (declared `image/png`, text bytes) → rejected at complete * with `MIME_MISMATCH` 415. * 5. a non-member cannot read the file (403 on `GET /files/:id` and * `GET /files/:id/download`; 403 on listing a foreign workspace). * 6. video mp4 → the file block renders a native `