Skip to content

Commit b0e2359

Browse files
authored
Merge pull request #240 from supabase/fix/remove-duplicate-slashes-from-file-paths
fix: trim duplicate slashes from file paths
2 parents c3f3ad7 + 2a54a56 commit b0e2359

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/packages/StorageFileApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ export default class StorageFileApi {
783783
}
784784

785785
private _getFinalPath(path: string) {
786-
return `${this.bucketId}/${path}`
786+
return `${this.bucketId}/${path.replace(/^\/+/, '')}`
787787
}
788788

789789
private _removeEmptyFolders(path: string) {

0 commit comments

Comments
 (0)