Better handling of invalid crop values

Archived from the Transloadit support forum. Originally posted on September 29, 2011; details may be outdated, see our docs for current behavior. Original thread

Using the ruby SDK, I added a step like this:

crop = transloadit.step 'crop', '/image/resize',
  :crop  => { x1:0, x2:320, y1:0, y2:460 },
  :format => 'jpg',
  :quality => 90,
  :strip => true,

This resulted in no crop, and instead a resize to 320x460 with no error messages.

This was very hard to figure out and it would have been better to fail with an error message saying that zero is not a valid x1 and/or y1 value for crop.

Cheers,
Luke

Hey Luke,

I tried to reproduce the problem with your parameters but on my side it seems to work.
Could you please provide an assembly ID where your problem exists?

Kind regards,
Karl

Hi Karl,

A (quietly) failing example is REDACTED

A working example is REDACTED

Cheers,
Luke

Hey Luke,

the error for your failing example is CurlCommand failed with exit code: 7: Failed to connect to host. because we cant reach your notify url: http://0.0.0.0:3000/api/transloadit/v1/notifications.
Please try to change your notify url. It should work then.

Kind regards,
Tim

Hi Tim,

I’ve resolved the issue – this isn’t a blocker for me. I just wanted to suggest more clarity in the docs and behavior around providing zeroes for crop coordinates.

Cheers,
Luke

Karl: Can you have a look at the docs tomorrow and see if you can make them more clear on this?