mirror of
https://github.com/directus/directus.git
synced 2026-01-25 09:48:08 -05:00
Fix files not returning busboy error
This commit is contained in:
@@ -67,9 +67,13 @@ const multipartHandler = asyncHandler(async (req, res, next) => {
|
||||
storage: payload.storage || disk,
|
||||
};
|
||||
|
||||
const primaryKey = await service.upload(fileStream, payloadWithRequiredFields, existingPrimaryKey);
|
||||
savedFiles.push(primaryKey);
|
||||
tryDone();
|
||||
try {
|
||||
const primaryKey = await service.upload(fileStream, payloadWithRequiredFields, existingPrimaryKey);
|
||||
savedFiles.push(primaryKey);
|
||||
tryDone();
|
||||
} catch (error) {
|
||||
busboy.emit('error', error);
|
||||
}
|
||||
});
|
||||
|
||||
busboy.on('error', (error: Error) => {
|
||||
|
||||
Reference in New Issue
Block a user