File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
packages/storage-vercel-blob/src Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,6 @@ type GenerateUrlArgs = {
9
9
10
10
export const getGenerateUrl = ( { baseUrl } : GenerateUrlArgs ) : GenerateURL => {
11
11
return ( { filename, prefix = '' } ) => {
12
- return `${ baseUrl } /${ path . posix . join ( prefix , filename ) } `
12
+ return `${ baseUrl } /${ path . posix . join ( prefix , encodeURIComponent ( filename ) ) } `
13
13
}
14
14
}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export const getStaticHandler = (
18
18
return async ( req , { params : { filename } } ) => {
19
19
try {
20
20
const prefix = await getFilePrefix ( { collection, filename, req } )
21
- const fileKey = path . posix . join ( prefix , filename )
21
+ const fileKey = path . posix . join ( prefix , encodeURIComponent ( filename ) )
22
22
23
23
const fileUrl = `${ baseUrl } /${ fileKey } `
24
24
const etagFromHeaders = req . headers . get ( 'etag' ) || req . headers . get ( 'if-none-match' )
You can’t perform that action at this time.
0 commit comments