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
<inputtype="text"class="form-control"placeholder="Number of speakers"name="nspeakers">
88
+
<inputtype="submit"value="Get me the stats!"class="btn btn-default">
89
+
</div>
90
+
</form>
91
+
```
92
+
93
+
Then in your javascript file you would add these lines to access both the file and the body. It is important that you use the `name` field value from the form in your upload function. This tells multer which field on the request it should look for the files in. If these fields aren't the same in the HTML form and on your server, your upload will fail:
The memory storage engine stores the files in memory as `Buffer` objects. It
214
247
doesn't have any options.
215
248
216
249
```javascript
217
-
var storage =multer.memoryStorage()
218
-
var upload =multer({ storage: storage })
250
+
conststorage=multer.memoryStorage()
251
+
constupload=multer({ storage: storage })
219
252
```
220
253
221
254
When using memory storage, the file info will contain a field called
@@ -275,8 +308,8 @@ If you want to catch errors specifically from Multer, you can call the
275
308
middleware function by yourself. Also, if you want to catch only [the Multer errors](https://github.com/expressjs/multer/blob/master/lib/multer-error.js), you can use the `MulterError` class that is attached to the `multer` object itself (e.g. `err instanceof multer.MulterError`).
0 commit comments