Skip to main content
You can upload data to the sandbox using the files.write() method.

Upload single file

Read the file from your local filesystem and pass its contents to files.write().
The upload has a default request timeout of 60 seconds. If you’re uploading large files that take longer to transfer, override it by passing requestTimeoutMs (JavaScript & TypeScript) or request_timeout (Python).

Upload with pre-signed URL

Sometimes, you may want to let users from unauthorized environments, like a browser, upload files to the sandbox. For this use case, you can use pre-signed URLs to let users upload files securely. All you need to do is create a sandbox with the secure: true option. An upload URL will then be generated with a signature that allows only authorized users to upload files. You can optionally set an expiration time for the URL so that it will be valid only for a limited time.

Upload directory / multiple files