Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.upload() getting error #133

Open
4 tasks
sanjeevbelagali opened this issue Mar 28, 2017 · 0 comments
Open
4 tasks

client.upload() getting error #133

sanjeevbelagali opened this issue Mar 28, 2017 · 0 comments

Comments

@sanjeevbelagali
Copy link

sanjeevbelagali commented Mar 28, 2017

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"' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant