fix: stream FilePond uploads to S3 and proxy private file previews
Disk-based multer plus an authenticated content endpoint match the working Node.js uploader and avoid browser signed-URL failures on SeaweedFS.
This commit is contained in:
@@ -63,6 +63,13 @@ const globalErrorHandler = (err, req, res, next) => {
|
||||
}, {});
|
||||
}
|
||||
|
||||
// Handle Multer upload errors
|
||||
if (err.name === 'MulterError') {
|
||||
statusCode = 400;
|
||||
errorCode = err.code === 'LIMIT_FILE_SIZE' ? 'VALIDATION_FAILED' : 'FILE_REQUIRED';
|
||||
details = { reason: err.code, field: err.field };
|
||||
}
|
||||
|
||||
// Handle Joi validation errors if forwarded as standard Error
|
||||
if (err.isJoi) {
|
||||
statusCode = 400;
|
||||
|
||||
Reference in New Issue
Block a user