Skip to content

@cloudflare/sandbox@0.10.1

Choose a tag to compare

@sandy-bonk sandy-bonk released this 11 May 18:46
· 141 commits to main since this release
a14a524

Patch Changes

  • #683 718d4e7 Thanks @aron-cf! - readFile now accepts encoding: 'none' on the rpc transport, returning a result whose content is a ReadableStream<Uint8Array> of raw binary data with no base64 encoding or buffering. Mirrors the existing writeFile support for ReadableStream input.

    // Stream a binary file without buffering or base64 overhead (rpc transport only)
    const { content, size, mimeType } = await sandbox.readFile(
      '/workspace/image.png',
      { encoding: 'none' }
    );