Add option to auto fix jpg orientation

This commit is contained in:
Chris Lu
2014-05-15 01:08:00 -07:00
parent 025589adf8
commit dcd12576c6
5 changed files with 19 additions and 20 deletions

View File

@@ -156,6 +156,10 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) {
return
}
if vs.FixJpgOrientation && strings.HasSuffix(string(needle.Name), ".jpg") {
needle.Data = images.FixJpgOrientation(needle.Data)
}
ret := operation.UploadResult{}
size, errorStatus := topology.ReplicatedWrite(vs.masterNode, vs.store, volumeId, needle, r)
if errorStatus == "" {