mirror of
https://github.com/pldubouilh/gossa
synced 2026-05-01 09:20:55 +02:00
cleanup var names
This commit is contained in:
parent
ba42b00304
commit
496490ba29
5 changed files with 7 additions and 7 deletions
4
Makefile
4
Makefile
|
|
@ -6,7 +6,7 @@ build:
|
|||
build-all:
|
||||
make embed
|
||||
env GOOS=linux GOARCH=amd64 go build gossa.go
|
||||
mv gossa gossa-linux
|
||||
mv gossa gossa-linux64
|
||||
env GOOS=linux GOARCH=arm go build gossa.go
|
||||
mv gossa gossa-linux-arm
|
||||
env GOOS=linux GOARCH=arm64 go build gossa.go
|
||||
|
|
@ -20,7 +20,7 @@ build-all:
|
|||
clean:
|
||||
-rm gossa.go
|
||||
-rm gossa
|
||||
-rm gossa-linux
|
||||
-rm gossa-linux64
|
||||
-rm gossa-linux-arm
|
||||
-rm gossa-linux-arm64
|
||||
-rm gossa-mac
|
||||
|
|
|
|||
4
main.go
4
main.go
|
|
@ -156,7 +156,7 @@ func doContent(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func upload(w http.ResponseWriter, r *http.Request) {
|
||||
unescaped, _ := url.PathUnescape(r.Header.Get("bossa-path"))
|
||||
unescaped, _ := url.PathUnescape(r.Header.Get("gossa-path"))
|
||||
fullPath, err := checkPath(unescaped)
|
||||
|
||||
logVerb("Up", err, fullPath)
|
||||
|
|
@ -232,7 +232,7 @@ func main() {
|
|||
}
|
||||
|
||||
var hostString = *host + ":" + *port
|
||||
fmt.Println("Bossa startig on directory " + initPath)
|
||||
fmt.Println("Gossa startig on directory " + initPath)
|
||||
fmt.Println("Listening on http://" + hostString)
|
||||
|
||||
var root = http.Dir(initPath)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ func postDummyFile(t *testing.T, url string, path string) string {
|
|||
req, err := http.NewRequest("POST", url, body)
|
||||
dieMaybe(t, err)
|
||||
req.Header.Set("Content-Type", "multipart/form-data; boundary=----WebKitFormBoundarycCRIderiXxJWEUcU")
|
||||
req.Header.Set("Bossa-Path", path)
|
||||
req.Header.Set("Gossa-Path", path)
|
||||
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
dieMaybe(t, err)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ gossa
|
|||
|
||||

|
||||
|
||||
[](https://travis-ci.org/pldubouilh/bossa)
|
||||
[](https://travis-ci.org/pldubouilh/gossa)
|
||||
|
||||
🎶 A fast and simple webserver for your files. It's dependency-free and with under 250 lines for the server code, easily code-reviewable.
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ function postFile (file, path) {
|
|||
path = decodeURI(location.pathname).slice(0, -1) + path
|
||||
|
||||
xhr.open('POST', window.location.origin + '/post')
|
||||
xhr.setRequestHeader("bossa-path", encodeURIComponent(path))
|
||||
xhr.setRequestHeader("gossa-path", encodeURIComponent(path))
|
||||
xhr.upload.id = newBar(path)
|
||||
|
||||
const formData = new window.FormData()
|
||||
|
|
|
|||
Loading…
Reference in a new issue