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", });