Skip to content

Commit 994d226

Browse files
committed
minor fixes
1 parent 470e238 commit 994d226

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

docs/cli/exec-command.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ e2b sandbox exec <sandbox-id> <command>
1515
You can pipe directly into the sandbox as well:
1616

1717
```bash
18-
echo "foo" | e2b sandbox exec <sandbox-id>
18+
echo "foo" | e2b sandbox exec <sandbox-id> <command>
1919
```
2020

2121
### Run in background

docs/filesystem/upload.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ All you need to do is create a sandbox with the `secure: true` option. An upload
4040
You can optionally set an expiration time for the URL so that it will be valid only for a limited time.
4141
<CodeGroup>
4242
```js JavaScript & TypeScript
43-
import fs from 'fs'
4443
import { Sandbox } from '@e2b/code-interpreter'
4544

4645
// Start a secured sandbox (all operations must be authorized by default)
@@ -60,7 +59,7 @@ form.append('file', 'file content')
6059
await fetch(publicUploadUrl, { method: 'POST', body: form })
6160

6261
// File is now available in the sandbox and you can read it
63-
const content = fs.readFileSync('demo.txt')
62+
const content = sandbox.files.read('/path/in/sandbox')
6463
```
6564
```python Python
6665
from e2b import Sandbox
@@ -74,6 +73,9 @@ signed_url = sandbox.upload_url(path="demo.txt", user="user", use_signature_expi
7473

7574
form_data = {"file":"file content"}
7675
requests.post(signed_url, data=form_data)
76+
77+
# File is now available in the sandbox and you can read it
78+
content = sandbox.files.read('/path/in/sandbox')
7779
```
7880
</CodeGroup>
7981

0 commit comments

Comments
 (0)