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

Decouple the Project Name from the Project URL (add a "url_name" parameter) #6

Open
dougthor42 opened this issue Jan 25, 2017 · 2 comments

Comments

@dougthor42
Copy link
Contributor

There should be a "url_name" parameter or something like that.

When uploading docs where name has a space in it, you end up getting urls that have %20:

curl -X POST -F [email protected] -F name="Some Name" -F version="0.0.1" -F description="Some Description" http://my_htd_instance/hmfd
# --> http://my_htd_instance/static/docfiles/Some%20Name/0.0.1/index.html

Personally I find this a bit ugly.

If there were another parameter that we could optionally send, we could do nifty things like this:

curl -X POST -F [email protected] -F url_name="my_project" -F name="Some Name" -F version="0.0.1" -F description="Some Description" http://my_htd_instance/hmfd
# --> http://my_htd_instance/static/docfiles/my_project/0.0.1/index.html

This would allow users to decouple the project name, what's seen here:
image
from the project url.

If the url_name parameter is not given, it just defaults to the name parameter, thus not changing the current functionality

Though personally I'd like to see name get URL-ized by going all lowercase and replacing space with underscore or dash, but that's a bit more breaking than what I'm proposing here.

@rgalanakis
Copy link
Owner

That's a cool idea, would you want to submit a PR for it?

@dougthor42
Copy link
Contributor Author

It's on my list of things to look into, but I doubt I'll be able to get around to it any time soon 😢

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