From fe4ef137d15daed7fbfa65227bcc5831243ddee1 Mon Sep 17 00:00:00 2001 From: Alberto Quiles Date: Mon, 5 Oct 2026 11:12:20 +0200 Subject: [PATCH] fix(s3): use Buffer in addObject - fix #140 --- src/modules/s3.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/s3.ts b/src/modules/s3.ts index 7a7a659..f75a4e2 100644 --- a/src/modules/s3.ts +++ b/src/modules/s3.ts @@ -1,6 +1,7 @@ import { Client } from "@s3"; import { walk } from "@std/fs"; import type { S3Mutable, S3ObjectInfo, S3Props } from "../types/s3.types.ts"; +import { Buffer } from "node:buffer"; export const getS3 = ({ endpoint, @@ -94,7 +95,7 @@ export const getS3 = ({ const addObject = async (name: string, buffer: Uint8Array) => { await checkBucket(bucket); - await client.putObject(bucket, name, buffer); + await client.putObject(bucket, name, Buffer.from(buffer)); }; return {