prisma-archive/serverless-image-proxy

Image url doesn't allow for an _IMAGE_NAME_ with '-' or multiple '.'

SamWyld opened this issue · 1 comments

When trying to query an image using this format: https://images.graph.cool/v1/__PROJECT_ID__/__FILE_SECRET__/__IMAGE_NAME__.__EXTENSION__

If the image name has includes '-' or multiple '.' it will fail and return this error:
Error: Invalid resize, crop pattern or name of image: image-name.jpg

Thanks a lot for bringing this up! Would you mind adding a few test cases as a PR which reproduce the problem?

Bonus points for also adding the solution to the PR :)