From 1da2338a052cd6c796380b36534ad59c71c0929a Mon Sep 17 00:00:00 2001 From: Tomas Beran Date: Fri, 17 Jul 2026 11:00:42 -0700 Subject: [PATCH] docs: document default 60s request timeout for file upload --- docs/filesystem/upload.mdx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/filesystem/upload.mdx b/docs/filesystem/upload.mdx index 63e0b00a..e4302c3f 100644 --- a/docs/filesystem/upload.mdx +++ b/docs/filesystem/upload.mdx @@ -7,6 +7,8 @@ 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()`. + ```js JavaScript & TypeScript import fs from 'fs' @@ -31,6 +33,19 @@ with open("path/to/local/file", "rb") as file: ``` +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). + + +```js JavaScript & TypeScript +// Override the default 60 second request timeout with 120 seconds +await sandbox.files.write('/path/in/sandbox', content, { requestTimeoutMs: 120_000 }) +``` +```python Python +# Override the default 60 second request timeout with 120 seconds +sandbox.files.write("/path/in/sandbox", file, request_timeout=120) +``` + + ## Upload with pre-signed URL Sometimes, you may want to let users from unauthorized environments, like a browser, upload files to the sandbox.