This repository was archived by the owner on May 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
client.upload() getting error #133
Copy link
Copy link
Open
Description
Subject of the issue
I am unable to run the code
Your environment
- Operating system
- Windows
- Node.js version (
node --version)- Node.js v4.x
- ImageMagick version (
identify -version)- ImageMagick v6.9.x
- s3-uploader version
- 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('bucket name', {
aws: {
path: 'images/',
region: 'us-east-1',
acl: 'public-read',
accessKeyId: keyId,
secretAccessKey: secretKey,
},
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'
},{
maxHeight: 100,
aspect: '1:1',
format: 'png',
suffix: '-thumb1'
},{
maxHeight: 250,
maxWidth: 250,
aspect: '1:1',
suffix: '-thumb2'
}]
});
client.upload('img.jpg', {}, function(err, versions, meta) {
if (err) {
console.log(err); }
versions.forEach(function(image) {
console.log(image.width, image.height, image.url);
// 1024 760 https://my-bucket.s3.amazonaws.com/path/110ec58a-a0f2-4ac4-8393-c866d813b8d1.jpg
});
});Expected behaviour
Tell us what should happen.
{ [Error: Command failed: C:\Windows\system32\cmd.exe /s /c "convert img.jpg -auto-orient -s trip -write mpr:img.jpg +delete mpr:img.jpg -quality 80 -resize "1040x1040" -write img-large .jpg +delete mpr:img.jpg -quality 70 -crop "NaNxNaN+NaN+NaN" -resize "780" -write img-medium .jpg +delete mpr:img.jpg -quality 70 -crop "NaNxNaN+NaN+NaN" -resize "x100" -write img-thumb 1.png +delete mpr:img.jpg -quality 70 -crop "NaNxNaN+NaN+NaN" -resize "250x250" img-thumb2.j pg"
convert.exe: invalid argument for option `-crop': NaNxNaN+NaN+NaN @ error/convert.c/ConvertI mageCommand/1176.
]
killed: false,
code: 1,
signal: null,
cmd: 'C:\\Windows\\system32\\cmd.exe /s /c "convert img.jpg -auto-orient -strip -write mpr :img.jpg +delete mpr:img.jpg -quality 80 -resize "1040x1040" -write img-large.jpg +delete mp r:img.jpg -quality 70 -crop "NaNxNaN+NaN+NaN" -resize "780" -write img-medium.jpg +delete mp r:img.jpg -quality 70 -crop "NaNxNaN+NaN+NaN" -resize "x100" -write img-thumb1.png +delete m pr:img.jpg -quality 70 -crop "NaNxNaN+NaN+NaN" -resize "250x250" img-thumb2.jpg"' }Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels