remove deprecated functions and fix corresponding unit test cases

This commit is contained in:
John
2019-09-06 16:59:38 +08:00
parent 0d5dfe59b9
commit 13e528abb6
21 changed files with 57 additions and 57 deletions

View File

@ -11,7 +11,7 @@ func Upload(r *ghttp.Request) {
fname := gfile.Basename(h.Filename)
buffer := make([]byte, h.Size)
f.Read(buffer)
gfile.PutBinContents("/tmp/"+fname, buffer)
gfile.PutBytes("/tmp/"+fname, buffer)
r.Response.Write(fname + " uploaded successly")
} else {
r.Response.Write(e.Error())