Changeset 3 in code for trunk/partage.go
- Timestamp:
- Oct 11, 2021, 1:30:16 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/partage.go
r2 r3 16 16 rootdir string 17 17 baseuri string 18 filectx string 18 19 maxsize int64 19 20 } … … 123 124 } 124 125 125 resp := conf.baseuri + "/"+ filepath.Base(tmp.Name())126 resp := conf.baseuri + conf.filectx + filepath.Base(tmp.Name()) 126 127 w.Write([]byte(resp)) 127 128 … … 151 152 conf.rootdir = "./static" 152 153 conf.baseuri = "http://192.168.0.3:8080" 154 conf.filectx = "/f/" 153 155 154 156 http.HandleFunc("/", parse) 157 http.Handle(conf.filectx, http.StripPrefix(conf.filectx, http.FileServer(http.Dir(conf.filepath)))) 155 158 http.ListenAndServe("0.0.0.0:8080", nil) 156 159 }
Note:
See TracChangeset
for help on using the changeset viewer.