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

upload error: convert failed #137

Open
4 tasks done
haseebnaseem opened this issue Aug 16, 2017 · 0 comments
Open
4 tasks done

upload error: convert failed #137

haseebnaseem opened this issue Aug 16, 2017 · 0 comments

Comments

@haseebnaseem
Copy link

haseebnaseem commented Aug 16, 2017

Subject of the issue

Unable to run the code given in the documentation.

Your environment

  • Operating system
    • Linux
  • Node.js version (node --version)
    • Node.js v6.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('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' }
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