PUT
/
browsers
/
{id}
/
fs
/
write_file
JavaScript
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: 'My API Key',
});

await client.browsers.fs.writeFile('id', fs.createReadStream('path/to/file'), { path: '/J!' });
This response does not have an example.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Browser session ID

Query Parameters

path
string
required

Destination absolute file path.

mode
string

Optional file mode (octal string, e.g. 644). Defaults to 644.

Body

application/octet-stream · file

The body is of type file.

Response

201

File written successfully