expressjs / expressjs/multer

Default to disk storage

Open
#174 9 comments 0 reactions 0 assignees View on GitHub
discuss
Dominant language
JavaScript
Stars
12.1k
Forks
1.1k
Avg merge
8d 2h
Merged PRs (30d)
21

Description

The readme states

> In case you omit the options object, the file will be renamed and uploaded to the temporary directory of the system.

However looking at the code if the options is undefined, it passes in an empty object.
Then if storage and dest are undefined it uses memory storage.

I got the behavior I expected the library to have by default with

``` javascript
var multer = require('multer')
var tmp = require('tmp');
var upload = multer({dest: tmp.dirSync().name});
```

I would suggest either updating the docs or updating the implementation to be consistent with the docs. I prefer the latter.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.