Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Latest commit

 

History

History
31 lines (22 loc) · 838 Bytes

File metadata and controls

31 lines (22 loc) · 838 Bytes

formidable-upload-example

Example express app using formidable-upload

var upload = require('formidable-upload');

var uploader = upload()
    .accept(/image*/)
    .to(['public', 'data', 'images'], '9876543210')
    .resize({
        use: 'resize',
        settings: {
            width: 800,
            quality: 80
        }
    });
    .imguri();

// ..

app.post('/upload', uploader.middleware('imagefile'), home.upload, home.errors);

Please note, magickwand is needed only if you're going to test resize. Follow Magickwand for instructions on installing it.

Pre-requisites (for magickwand)

On Linux: apt-get install libmagickwand-dev On Mac (Using Homebrew) brew install imagemagick --disable-openmp