1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00

add content_data

This commit is contained in:
shaoying 2019-08-07 08:55:49 +08:00
parent 23f4133695
commit 668dacb7c5

View File

@ -532,7 +532,10 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
uuu, e := url.Parse(uri)
m.Assert(e)
if m.Has("file") { // POST file
if m.Has("content_data") { // POST file
body = bytes.NewReader([]byte(m.Option("content_data")))
} else if m.Has("file") { // POST file
writer := multipart.NewWriter(&bytes.Buffer{})
defer writer.Close()