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:
2026-08-15 18:46:26 +03:30
parent 7ebf9409f0
commit 1ef54ad414
9 changed files with 173 additions and 30 deletions
+7
View File
@@ -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;