Skip to content

Commit

Permalink
fix(assets): remove dot from file extension (#512)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
arashsheyda and antfu committed Nov 8, 2023
1 parent 6e37584 commit 8e4ec7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/devtools/src/server-rpc/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }: N

const { ext } = parse(finalPath)
if (extensions !== '*') {
if (!extensions.includes(ext.toLowerCase()))
if (!extensions.includes(ext.toLowerCase().slice(1)))
throw new Error(`File extension ${ext} is not allowed to upload, allowed extensions are: ${extensions.join(', ')}\nYou can configure it in Nuxt config at \`devtools.assets.uploadExtensions\`.`)
}

Expand Down

0 comments on commit 8e4ec7b

Please sign in to comment.