Skip to main content
files.write() sends data from local code into the sandbox filesystem. A second path covers uploads from a browser, which holds no API key. The backend issues a pre-signed upload URL, and the browser posts the file to it.
Install the SDK, or the CLI for ppio commands, and set the PPIO_API_KEY and PPIO_DOMAIN environment variables before running these examples. See Quickstart and Install and authenticate.

Upload a single file

Upload with a pre-signed URL

Pre-signed upload URLs let users upload files securely from environments that hold no API key, such as web browsers. Create the sandbox with the secure: true option, then use the SDK on the trusted backend to generate the upload URL.
Return the URL only to users authorized by the application, and set a short expiration time. Anyone who holds the URL can use it until it expires.

Upload a directory or several files

Read a local directory into a list of files, then write the list in one call.
Last modified on November 19, 2026