Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404s when using a default source #62

Open
ernestopye opened this issue Jul 17, 2015 · 1 comment
Open

404s when using a default source #62

ernestopye opened this issue Jul 17, 2015 · 1 comment

Comments

@ernestopye
Copy link
Contributor

So, I'm running into a small issue, which has fairly simple workarounds, but wanted to see if you had any input on this.

Basically, I'm storing images in different folders, and sometimes, the folder names might start with an "s." This causes that portion of the URL to be identifier as the modifier (square, happens with others too, "w", "h", etc), removing the folder from the "resolved" URL. This happens only when you have a default source defined, since you don't need to specify the modifiers in the URL. So for example:

Image stored in /samples/test.jpg, using the local source. I can request it just fine via:

/elocal/samples/test.jpg

but if i just do:

/samples/test.jpg

then it tries to read the image from /test.jpg, resulting in a 404.

There are 2 simple workarounds - always specifying the source, or simply adding an underscore prefix to the base folders. Wondering if you had any ideas on how we might be able to avoid this situation in a more elegant way.

@jimmynicol
Copy link
Owner

@ernestopye sorry for the delayed reply.

I dont see any reason why we should be able to validate the modifiers better and not throw a 404. For instance in your example /sample/...' is evaluating tos: ample` as a modifier. We do know ahead of time what the sources are so we should be able to discount that one.

Let me work up a solution, but in the meantime your workarounds seem feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants