Skip to content

Default to disk storage #174

@charlierudolph

Description

@charlierudolph

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions