New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

filerup

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filerup

express file upload

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

Installation

npm i filerup

Init

var filerup = require('filerup')(app);

Usage

app.use('/upload', function (req, res) {
    var msg = filerup.upload(req,{
        fields: ['avatar'], // Default: all fields
        types: ['bmp','png'], // Default: all types
        dist: './public/uploads', // Default: './uploads'
        maxSize: '1Mb', // Default: 2Mb
        together: false // Default: true
    });
    res.json({msg: msg});
})
// returns: {
//     path: array of paths of files stored,
//     report: a report object of booleans on filters if a filter does not pass it is set to false
// }

Options

  • fields: fields if you want to restrict fields from form
  • types: list of accepted types
  • dist: destination folder
  • maxSize: maximum file size
  • together: store files together, if one of them is not valid don't put it

Keywords

express

FAQs

Package last updated on 27 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts