Solution skill
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. Use when hitting this exact issue. Not for unrelated errors or different features.
TL;DR
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.
Fix
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. Expected: you can confirm this matches your situation.
When to use
- You are dealing with this situation.
- The symptom matches: Strip the /files/ prefix for raw file endpoints - and release your sessions.
When NOT to use
- Unrelated issues with a different cause.
- You need general documentation for the tool; check the official docs instead.
Compatibility
Reported per the linked source.
Variant phrasings
Strip the /files/ prefix for raw file endpoints - and release your sessions
Why it happens
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.
Edge cases
- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.
Evidence
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. Resolved: 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: https://docs.steel.dev/overview/files-api/overview
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
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_5KD4GcT4NrXCXp-hX-8dRA" 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>