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

Serve a directory #12

Closed
patrikhermansson opened this issue Nov 14, 2014 · 3 comments
Closed

Serve a directory #12

patrikhermansson opened this issue Nov 14, 2014 · 3 comments

Comments

@patrikhermansson
Copy link

Hello,
This is a great project but I can't get directory sharing to work. I'm trying to share static html and images. I saw there was an earlier issue about this but it seems that that solution doesn't work anymore, or am I wrong?

@damian-kolakowski
Copy link
Member

@patrikhermansson i've just pushed a fix to provide files sharing again. The latest version of swift does not support subscripts with multiple output types so the way how Swifter share files changed from:

server["/resources/(.+)"] = "~/"

to:

server["/resources/(.+)"] = HttpHandlers.directory("~/")

@patrikhermansson
Copy link
Author

Thank you! That works. One more question: what would it take to make swifter serve not only text-files but also images for example.

@damian-kolakowski
Copy link
Member

It's ready (1102e0c). Please visit: http://127.0.0.1:8080/resources/logo.png to test.

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