1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Uploading works, needs to be cleaned up

This commit is contained in:
Zack Scholl 2016-03-28 10:49:48 -04:00
parent 3a8b6ae64d
commit 7250ebc0a2

View File

@ -153,13 +153,14 @@ Options:`)
} }
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
buf.ReadFrom(reader) buf.ReadFrom(reader)
s := buf.String() // Does a complete copy of the bytes in the buffer.
fmt.Println("---------------") fmt.Println("---------------")
fmt.Println(s) fmt.Println(buf.String())
fmt.Println("---------------") fmt.Println("---------------")
fmt.Println(c.ContentType()) fmt.Println(c.ContentType())
fmt.Println(c.Request.Header) fmt.Println(c.Request.Header)
fmt.Println("---------------") fmt.Println("---------------")
p := WikiData{filename, "", []string{}, []string{}, false, ""}
p.save(buf.String())
}) })
r.GET("/:title/*option", everythingElse) r.GET("/:title/*option", everythingElse)
r.POST("/:title/*option", encryptionRoute) r.POST("/:title/*option", encryptionRoute)