@aws-amplify/storage
Version:
Storage category of aws-amplify
14 lines (12 loc) • 495 B
JavaScript
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
/**
* Server-side `readFile` implementation using `Blob.arrayBuffer()`.
*
* `Blob` (and `File`, which extends `Blob`) expose `arrayBuffer()` in
* Node.js 18+ — this is the canonical way to read blob contents on the
* server without relying on browser-only `FileReader`.
*/
const readFile = blob => blob.arrayBuffer();
export { readFile };
//# sourceMappingURL=readFile.mjs.map