0.11.0 • Published 9 years ago

sails-hook-thumber v0.11.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

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"