|
@ -42,7 +42,7 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
reqNeedle, originalSize, ne := needle.CreateNeedleFromRequest(r, vs.FixJpgOrientation, vs.fileSizeLimitBytes) |
|
|
|
|
|
|
|
|
reqNeedle, originalSize, contentMd5, ne := needle.CreateNeedleFromRequest(r, vs.FixJpgOrientation, vs.fileSizeLimitBytes) |
|
|
if ne != nil { |
|
|
if ne != nil { |
|
|
writeJsonError(w, r, http.StatusBadRequest, ne) |
|
|
writeJsonError(w, r, http.StatusBadRequest, ne) |
|
|
return |
|
|
return |
|
@ -70,6 +70,7 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) { |
|
|
ret.ETag = reqNeedle.Etag() |
|
|
ret.ETag = reqNeedle.Etag() |
|
|
ret.Mime = string(reqNeedle.Mime) |
|
|
ret.Mime = string(reqNeedle.Mime) |
|
|
setEtag(w, ret.ETag) |
|
|
setEtag(w, ret.ETag) |
|
|
|
|
|
w.Header().Set("Content-MD5", contentMd5) |
|
|
writeJsonQuiet(w, r, httpStatus, ret) |
|
|
writeJsonQuiet(w, r, httpStatus, ret) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|