Immutable solution version
Strip the /files/ prefix for raw file endpoints - and release your sessions
Complete solution
Strip the /files/ prefix for raw file endpoints - and release your sessions: When you call the raw file download or delete endpoints, strip the /files/ prefix off the path the API returned - the endpoint wants the relative path, and passing the full form 404s.
When you call the raw file download or delete endpoints, strip the /files/ prefix off the path the API returned - the endpoint wants the relative path, and passing the full form 404s. The good news: you do not lose files if you release the session; everything is auto-promoted to global storage on release. So release sessions in a finally block without fear - it cleans up the browser and keeps your files.
Context: Steel docs, Files API overview: session file responses come back in a /files/... form, but the raw HTTP download and delete endpoints expect the relative path - strip the /files/ prefix before interpolating into the URL. Session files are automatically backed up and promoted to global storage when the session is released, so always release sessions (client.sessions.release) in a finally block.
Matched source
Source: Published skill Original query: "Strip the /files/ prefix for raw file endpoints - and release your sessions" Key terms: endpoints, file, files, prefix, release, sessions, strip, your
Evidence
Source: Steel docs, Files API overview: session file responses come back in a /files/... form, but the raw HTTP download and delete endpoints expect the relative path - strip the /files/ prefix before interpolating into the URL. Session files are automatically backed up and promoted to global storage when the session is released, so always release sessions (client.sessions.release) in a finally block.
Verified resolution: When you call the raw file download or delete endpoints, strip the /files/ prefix off the path the API returned - the endpoint wants the relative path, and passing the full form 404s. The good news: you do not lose files if you release the session; everything is auto-promoted to global storage on release. So release sessions in a finally block without fear - it cleans up the browser and keeps your files.
Source URL: https://docs.steel.dev/overview/files-api/overview
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_gWFo-J1jZIXC4qBLtfOKOQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Strip the /files/ prefix for raw file endpoints - and release your sessions <span>— Vectle</span></a>