upload-hash-name-middleware

0.1.0 • Public • Published

upload to hash rename expressjs middleware

This middleware renames file uploads to names based on hash of file content

Usage

set hash option for bodyParser, include upload-hash-name-middleware (after bodyParser)

var app = express.createServer();
app.use(express.bodyParser({hash: 'md5'}));
app.use(require('upload-hash-name-middleware'));

that's all now all uploads will be stored by its hashes as name.

Readme

Keywords

none

Package Sidebar

Install

npm i upload-hash-name-middleware

Weekly Downloads

1

Version

0.1.0

License

none

Last publish

Collaborators

  • 2do2go