new metadata header

This commit is contained in:
Regalijan 2024-03-26 04:38:12 -04:00
parent db2946c68e
commit e5f3457bb7
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

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