sails-hook-thumber
v0.11.0
Published
Sails JS hook to make thumber fast and store it on locale disk or in Amazon S3.
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++-devInstallation
npm install sails-hook-thumber --saveUSECASE
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"
