Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

upload error: convert failed #137

@haseebnaseem

Description

@haseebnaseem

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' }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions