You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if I understand how multer works correctly, it parses the multipart data, then passes it to fileFilter, then the storage engine.
Is there a way to inject a step before storage engine to confirm other non file fields are defined properly before files are stored? fileFilter doesn't get called for the text fields.
I'm thinking I'll have to a memory storage, then pass that blob onto wherever I actually want it stored.
The text was updated successfully, but these errors were encountered:
When the fileFilter is triggered, any text fields that have been parsed up to that point will be available in req.body. Multer cannot give any guarantees on the order that the web browser sends the fields thought, so the fields you want to check might or might not be available at that time.
This has come up a number of times before, e.g. #146 where a workaround is outlined.
So if I understand how multer works correctly, it parses the multipart data, then passes it to fileFilter, then the storage engine.
Is there a way to inject a step before storage engine to confirm other non file fields are defined properly before files are stored? fileFilter doesn't get called for the text fields.
I'm thinking I'll have to a memory storage, then pass that blob onto wherever I actually want it stored.
The text was updated successfully, but these errors were encountered: