Prevent serving metadata files
git-svn-id: file:///srv/svn/repo/marisa/trunk@23 d6811dac-2434-b64a-9ddc-f563ab233461
This commit is contained in:
parent
5338ce1197
commit
78f09f6a6a
@ -175,8 +175,7 @@ func uploaderPost(w http.ResponseWriter, r *http.Request) {
|
||||
writemeta(tmp.Name(), conf.expiry)
|
||||
|
||||
|
||||
//link := conf.baseuri + conf.filectx + filepath.Base(tmp.Name())
|
||||
link := conf.baseuri + conf.metactx + filepath.Base(tmp.Name()) + ".json"
|
||||
link := conf.baseuri + conf.filectx + filepath.Base(tmp.Name())
|
||||
links = append(links, link)
|
||||
}
|
||||
|
||||
@ -230,6 +229,5 @@ func main() {
|
||||
|
||||
http.HandleFunc("/", uploader)
|
||||
http.Handle(conf.filectx, http.StripPrefix(conf.filectx, http.FileServer(http.Dir(conf.filepath))))
|
||||
http.Handle(conf.metactx, http.StripPrefix(conf.metactx, http.FileServer(http.Dir(conf.metapath))))
|
||||
http.ListenAndServe("0.0.0.0:8080", nil)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user