|
@ -11,6 +11,7 @@ import ( |
|
|
"io/ioutil" |
|
|
"io/ioutil" |
|
|
"net/http" |
|
|
"net/http" |
|
|
"strconv" |
|
|
"strconv" |
|
|
|
|
|
"strings" |
|
|
"time" |
|
|
"time" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
@ -45,6 +46,10 @@ func OperationRecord() gin.HandlerFunc { |
|
|
Body: string(body), |
|
|
Body: string(body), |
|
|
UserID: userId, |
|
|
UserID: userId, |
|
|
} |
|
|
} |
|
|
|
|
|
values := c.Request.Header.Values("content-type") |
|
|
|
|
|
if strings.Contains(values[0], "boundary"){ |
|
|
|
|
|
record.Body = "file" |
|
|
|
|
|
} |
|
|
writer := responseBodyWriter{ |
|
|
writer := responseBodyWriter{ |
|
|
ResponseWriter: c.Writer, |
|
|
ResponseWriter: c.Writer, |
|
|
body: &bytes.Buffer{}, |
|
|
body: &bytes.Buffer{}, |
|
|