node-s3-uploader
node-s3-uploader copied to clipboard
upload error: convert failed
Subject of the issue
Unable to run the code given in the documentation.
Your environment
- Operating system
- [x] Linux
- Node.js version (
node --version
)- [x] Node.js v6.x
- ImageMagick version (
identify -version
)- [x] ImageMagick v6.9.x
- s3-uploader version
- [x] v2.x
Steps to reproduce
Tell us how to reproduce this issue. Please provide a minimal code example to demonstrate the problem.
var client = new Upload('my_s3_bucket', {
aws: {
path: 'images/',
region: 'us-east-1',
acl: 'public-read'
},
cleanup: {
versions: true,
original: false
},
original: {
awsImageAcl: 'private'
},
versions: [{
maxHeight: 1040,
maxWidth: 1040,
format: 'jpg',
suffix: '-large',
quality: 80,
awsImageExpires: 31536000,
awsImageMaxAge: 31536000
},{
maxWidth: 780,
aspect: '3:2!h',
suffix: '-medium'
},{
maxWidth: 320,
aspect: '16:9!h',
suffix: '-small'
},{
maxHeight: 100,
aspect: '1:1',
format: 'png',
suffix: '-thumb1'
},{
maxHeight: 250,
maxWidth: 250,
aspect: '1:1',
suffix: '-thumb2'
}]
});
client.upload('1.jpg', {}, function(err, versions, meta) {
if (err) { throw err; }
versions.forEach(function(image) {
console.log(image.width, image.height, image.url);
});
});
Expected behaviour
The image should be uploaded.
Actual behaviour
client.upload
throws an error
{ Error: Command failed: convert 1.jpg -auto-orient -strip -write mpr:1.jpg +delete
convert: missing an image filename `+delete' @ error/convert.c/ConvertImageCommand/3212.
at ChildProcess.exithandler (child_process.js:205:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Socket.<anonymous> (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at Pipe._handle.close [as _onclose] (net.js:511:12)
killed: false,
code: 1,
signal: null,
cmd: 'convert 1.jpg -auto-orient -strip -write mpr:1.jpg +delete' }