MaisonetteWorld / magine

An image service for managing crops and optimizing sizes
MIT License
0 stars 1 forks source link

Uploading images with spaces in the name fails #63

Open dinohamzic opened 4 years ago

dinohamzic commented 4 years ago

When I try to upload a PNG image from the CMS frontend the optimized version is never returned, instead an empty object is received.

Steps to reproduce:

  1. Visit http://localhost:3000/pages/31 (CMS frontend)
  2. Click on + ADD NEW MODULE
  3. Select CIRCLE_BANNER
  4. Fill out the fields and select a PNG image
  5. Save
  6. Refresh the page

Result: the image optimization state will be stuck with the message This image is currently being optimized, it will be available soon. Refresh the page in a few moments.

Screen Shot 2019-12-09 at 14 57 19

Repeat the same steps but use a JPG image instead. Result: after some time the optimized image appears.

Screen Shot 2019-12-09 at 17 30 32

My .env file:

ASSET_LOCATION='https://assets.stg.env.maisonette.com'
FRONTEND_HOST='http://localhost:7777'
NEXT_PORT=3000
NODE_ENV='dev'
STRAPI_HOST='https://strapi.stg.env.maisonette.com'
SOLIDUS_HOST='https://backend.stg.env.maisonette.com'
SLI_HOST='https://maisonette.resultsstage.com'
KempfCreative commented 4 years ago

Awesome issue description. I will tackle this ASAP.

KempfCreative commented 4 years ago

The PNG files being tested start with "screen shot"

KempfCreative commented 4 years ago

Don't close this.

We need to verify that the workaround (sending non-spaced image names from the CMS) is working.

The actual Magine issue should be resolved in this code as well.