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