drupflare/worker - v1.0.0
    Preparing search index...

    Function bytesToBase64

    • Bytes to base64, for the crossing into PHP.

      Chunked through String.fromCharCode rather than spreading the whole array. fromCharCode(...bytes) passes every byte as an argument, and a 200 KB chunk is 200,000 arguments -- which overflows the call stack rather than returning a wrong answer, so it would fail on exactly the large uploads this module exists to support and pass every small-file test.

      Parameters

      • bytes: Uint8Array

      Returns string