2c995d4494
## Summary
- Adds an opt-in `useOctetStream` / `use_octet_stream` flag to sandbox
file write — JS on `FilesystemWriteOpts`, Python keyword on `write` /
`write_files` (async + sync).
- Changes the default upload path to `multipart/form-data` regardless of
envd version. Callers must opt in to `application/octet-stream`
(requires envd 0.5.7 or later).
## Example
JS:
```ts
// Default — multipart/form-data
await sandbox.files.write('hello.txt', 'world')
// Opt in to application/octet-stream (envd >= 0.5.7)
await sandbox.files.writeFiles(
[{ path: 'a.txt', data: 'a' }, { path: 'b.txt', data: 'b' }],
{ useOctetStream: true },
)
```
Python:
```python
# Default — multipart/form-data
sandbox.files.write('hello.txt', 'world')
# Opt in to application/octet-stream (envd >= 0.5.7)
await sandbox.files.write_files(
[{'path': 'a.txt', 'data': 'a'}, {'path': 'b.txt', 'data': 'b'}],
use_octet_stream=True,
)
```
## Test plan
- [ ] JS: `pnpm --filter e2b run lint && pnpm --filter e2b run
typecheck`
- [ ] Python: `cd packages/python-sdk && poetry run make lint && poetry
run make typecheck`
- [ ] Manual write with and without `useOctetStream` /
`use_octet_stream` against envd 0.5.7+.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Changesets
To add changeset run:
npx changeset
in the root of the project. This will create a new changeset in the .changeset folder.