|
|
@ -43,7 +43,7 @@ export default defineWrappedResponseHandler(async (event) => { |
|
|
const upload = multer({ |
|
|
const upload = multer({ |
|
|
storage, |
|
|
storage, |
|
|
limits: { |
|
|
limits: { |
|
|
fileSize: 5 * 1024 * 1024, // 5MB 限制
|
|
|
fileSize: 10 * 1024 * 1024, // 10MB 限制
|
|
|
}, |
|
|
}, |
|
|
fileFilter: (req, file, cb) => { |
|
|
fileFilter: (req, file, cb) => { |
|
|
const allowedTypes = ['image/png', 'image/jpeg', 'image/jpg', 'image/webp']; |
|
|
const allowedTypes = ['image/png', 'image/jpeg', 'image/jpg', 'image/webp']; |
|
|
|