sails-hook-thumber

0.11.0 • Public • Published

Sails Hook Thumber

Create fastly thumber for you file and store it in locale disk or in Amazon S3

Check native-thumber for config thumb

You need :

sudo apt-get install libmagick++-dev

Installation

npm install sails-hook-thumber --save

USECASE

thumbConf =
    fd: item.fd
    filename: filename
    size: item.size

sails.hooks.thumber.process thumbConf, () ->
    console.log "success start"

Ex: In your Controller

req.file('file').upload (err, files) ->
    for file in files
        thumbConf =
            fd: file.fd
            filename: 'test.jpg'
            size: file.size
        sails.hooks.thumber.process thumbConf, () ->
            console.log "success start"

Dependents (0)

Package Sidebar

Install

npm i sails-hook-thumber

Weekly Downloads

0

Version

0.11.0

License

MIT

Last publish

Collaborators

  • wi2