From e5f3457bb7477d707f14c405a10e3173a551021e Mon Sep 17 00:00:00 2001 From: Regalijan Date: Tue, 26 Mar 2024 04:38:12 -0400 Subject: [PATCH] new metadata header --- functions/api/coconut.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/api/coconut.ts b/functions/api/coconut.ts index 086d6b5..38ebac6 100644 --- a/functions/api/coconut.ts +++ b/functions/api/coconut.ts @@ -48,7 +48,8 @@ export async function onRequestPost(context: RequestContext) { const R2_URL = `https://car-crushers.${context.env.R2_ZONE}.r2.cloudflarestorage.com`; await aws.fetch(`${R2_URL}/${id}`, { headers: { - "x-amz-copy-source": `car-crushers/${attachment}`, + "x-amz-copy-source": `/car-crushers/${attachment}`, + "x-amz-metadata-directive": "COPY", }, method: "PUT", });