We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28d97fa commit 329e932Copy full SHA for 329e932
server/api/storage/upload.post.ts
@@ -9,7 +9,7 @@ export default eventHandler(async (event) => {
9
throw createError({ status: 400, message: 'No file provided' })
10
}
11
12
- if (file.type !== 'image/png' && file.type !== 'image/jpeg') {
+ if (!file.type.startsWith('image/')) {
13
throw createError({ status: 400, message: 'File must be an image' })
14
15
0 commit comments