filer store original data size instead of data size after gzip

This commit is contained in:
Chris Lu
2018-12-22 13:11:07 -08:00
parent 141d302492
commit be946c9e54
4 changed files with 15 additions and 13 deletions

View File

@@ -12,7 +12,7 @@ import (
)
func parseMultipart(r *http.Request) (
fileName string, data []byte, mimeType string, isGzipped, isChunkedFile bool, e error) {
fileName string, data []byte, mimeType string, isGzipped bool, originalDataSize int, isChunkedFile bool, e error) {
form, fe := r.MultipartReader()
if fe != nil {
glog.V(0).Infoln("MultipartReader [ERROR]", fe)
@@ -64,6 +64,8 @@ func parseMultipart(r *http.Request) (
}
}
originalDataSize = len(data)
isChunkedFile, _ = strconv.ParseBool(r.FormValue("cm"))
if !isChunkedFile {