sails-hook-thumber
v0.11.0
Published
Sails JS hook to make thumber fast and store it on locale disk or in Amazon S3.
Downloads
1
Readme
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 :
- ImageMagick's : http://www.imagemagick.org/
- Magick++
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"