Skip to content

Commit

Permalink
fix(s3): Remove trailing slash on key normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed Jan 14, 2024
1 parent 8e86f0a commit 73bf8c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default defineDriver((options: S3DriverOptions) => {
return awsClient
}

const normalizedKey = (key: string) => key.replace(/:/g, "/")
const normalizedKey = (key: string) => key.replace(/:/g, "/").replace(/\/+$/, '')

const awsUrlWithoutKey = joinURL(options.endpoint, options.bucket);

Expand Down

0 comments on commit 73bf8c0

Please sign in to comment.