mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
fix: update key handling in StorageR2Adapter to conditionally prepend keyPrefix
- Modified getKey method to prepend keyPrefix only if it is not empty, ensuring correct key formatting.
This commit is contained in:
@@ -177,8 +177,11 @@ export class StorageR2Adapter extends StorageAdapter {
|
||||
}
|
||||
|
||||
protected getKey(key: string) {
|
||||
if (this.keyPrefix.length > 0) {
|
||||
return `${this.keyPrefix}/${key}`.replace(/^\/\//, "/");
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
toJSON(secrets?: boolean) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user