PRODUCTION SCENARIO
A SaaS product lets each customer upload PDFs through the Files API and later ask questions about them. The frontend posts the customer's chosen file_id straight into the Messages request.
What should the team change to keep customer files isolated?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: Hold file IDs server-side and upload each tenant's files into its own workspace
Uploaded files are reachable by any API key with access to the workspace, so the workspace is the isolation boundary: keep file IDs as server-side references mapped to your own users, and give each tenant its own workspace. Signing the IDs stops a user forging one but leaves every file in the shared workspace readable by any key that reaches it. A tenant prefix is a naming convention, and access is by file_id whatever the file is called. A one-hour expiry shortens the exposure window without closing it.
Official Source: https://platform.claude.com/docs/en/build-with-claude/files ↗