UNPKG

@aws-amplify/storage

Version:

Storage category of aws-amplify

1 lines 682 B
{"version":3,"file":"readFile.mjs","sources":["../../../../src/server/utils/readFile.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Server-side `readFile` implementation using `Blob.arrayBuffer()`.\n *\n * `Blob` (and `File`, which extends `Blob`) expose `arrayBuffer()` in\n * Node.js 18+ — this is the canonical way to read blob contents on the\n * server without relying on browser-only `FileReader`.\n */\nexport const readFile = blob => blob.arrayBuffer();\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,IAAI,IAAI,IAAI,CAAC,WAAW;;;;"}