|
@ -106,6 +106,9 @@ func ParseUpload(r *http.Request) ( |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
isChunkedFile, _ = strconv.ParseBool(r.FormValue("cm")) |
|
|
|
|
|
isGzipped = false |
|
|
|
|
|
if !isChunkedFile { |
|
|
dotIndex := strings.LastIndex(fileName, ".") |
|
|
dotIndex := strings.LastIndex(fileName, ".") |
|
|
ext, mtype := "", "" |
|
|
ext, mtype := "", "" |
|
|
if dotIndex > 0 { |
|
|
if dotIndex > 0 { |
|
@ -132,9 +135,10 @@ func ParseUpload(r *http.Request) ( |
|
|
!strings.HasSuffix(fileName, ".tar.gz") { |
|
|
!strings.HasSuffix(fileName, ".tar.gz") { |
|
|
fileName = fileName[:len(fileName)-3] |
|
|
fileName = fileName[:len(fileName)-3] |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
modifiedTime, _ = strconv.ParseUint(r.FormValue("ts"), 10, 64) |
|
|
modifiedTime, _ = strconv.ParseUint(r.FormValue("ts"), 10, 64) |
|
|
ttl, _ = ReadTTL(r.FormValue("ttl")) |
|
|
ttl, _ = ReadTTL(r.FormValue("ttl")) |
|
|
isChunkedFile, _ = strconv.ParseBool(r.FormValue("cm")) |
|
|
|
|
|
|
|
|
|
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
func NewNeedle(r *http.Request, fixJpgOrientation bool) (n *Needle, e error) { |
|
|
func NewNeedle(r *http.Request, fixJpgOrientation bool) (n *Needle, e error) { |
|
|