Skip to content
Snippets Groups Projects
Commit 2860406a authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Improved paths

parent a158fc4a
Branches
No related tags found
No related merge requests found
......@@ -314,7 +314,6 @@ func main() {
})
http.Handle("/assets/", http.StripPrefix("/assets/", assetServer))
http.Handle("/i/", http.StripPrefix("/i/", imageServer))
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
user := parseUser(r)
......@@ -328,6 +327,7 @@ func main() {
panic(err)
}
})
http.Handle("/", imageServer)
err = http.ListenAndServe(":8080", nil)
if err != nil {
......
......@@ -2,9 +2,9 @@
{{define "content"}}
<div class="images">
{{range .Images}}
<a class="image" href="/i/{{.Id}}">
<a class="image" href="/{{.Id}}">
<div class="image-container">
<img src="/i/{{.Id}}t" >
<img src="/{{.Id}}t" >
</div>
<div class="info">
<p>{{.OriginalName}}</p>
......
......@@ -3,7 +3,7 @@
{{range .Results}}
{{if .Success}}
<div class="info success">
<h2>Upload of {{.Id}} finished. <a href="/i/{{.Id}}">View</a>.</h2>
<h2>Upload of {{.Id}} finished. <a href="/{{.Id}}">View</a>.</h2>
</div>
{{else}}
<div class="info error">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment