Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
new metadata header
  • Loading branch information
regalijan committed Mar 26, 2024
1 parent db2946c commit e5f3457
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/api/coconut.ts
Expand Up @@ -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",
});
Expand Down

0 comments on commit e5f3457

Please sign in to comment.