isaachinman / wundershine-native-app

0 stars 0 forks source link

Convert all images to JPG before sending to fulfilment partners #123

Open isaachinman opened 6 years ago

isaachinman commented 6 years ago

Describe the bug HH's supported file format enum only includes JPG, resulting in errors when trying to create printpack orders that contain PNG images.

To Reproduce Steps to reproduce the behavior:

  1. Create an order containing one or more PNG images.
  2. Click on create order
  3. See error - nothing happens. API returns a 400 containing HH's error message:

    "instance value ("png") not found in enum (possible values: ["jpg"])"

Expected behavior Orders with PNG images can be processed without issue.

Solution Convert all images to JPG during the "prepare for HH" process. Most likely in or around [this line](https://github.com/isaachinman/wundershine-api/blob/master/src/utils/huighaverlag/prepare-order-for-huighaverlag.js#L26.

isaachinman commented 6 years ago

Fixed on the API side.