diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-06-20 12:50:40 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-06-20 12:50:40 -0700 |
| commit | de5ca9b25809e846026784b6721cfc76471c87bf (patch) | |
| tree | 20a8a6a1b6dee4b698f2e2f74c652e898a248114 /weed/storage | |
| parent | 3080c197e3e75dfd48ce2bda08c46d1f6423e65c (diff) | |
| download | seaweedfs-de5ca9b25809e846026784b6721cfc76471c87bf.tar.xz seaweedfs-de5ca9b25809e846026784b6721cfc76471c87bf.zip | |
remove fixJpgOrientation
Diffstat (limited to 'weed/storage')
| -rw-r--r-- | weed/storage/needle/needle.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/weed/storage/needle/needle.go b/weed/storage/needle/needle.go index 7d02758d6..4c62aa00b 100644 --- a/weed/storage/needle/needle.go +++ b/weed/storage/needle/needle.go @@ -8,7 +8,6 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/images" . "github.com/chrislusf/seaweedfs/weed/storage/types" ) @@ -48,7 +47,7 @@ func (n *Needle) String() (str string) { return } -func CreateNeedleFromRequest(r *http.Request, fixJpgOrientation bool, sizeLimit int64) (n *Needle, originalSize int, e error) { +func CreateNeedleFromRequest(r *http.Request, sizeLimit int64) (n *Needle, originalSize int, e error) { n = new(Needle) pu, e := ParseUpload(r, sizeLimit) if e != nil { @@ -95,13 +94,6 @@ func CreateNeedleFromRequest(r *http.Request, fixJpgOrientation bool, sizeLimit n.SetIsChunkManifest() } - if fixJpgOrientation { - loweredName := strings.ToLower(pu.FileName) - if pu.MimeType == "image/jpeg" || strings.HasSuffix(loweredName, ".jpg") || strings.HasSuffix(loweredName, ".jpeg") { - n.Data = images.FixJpgOrientation(n.Data) - } - } - n.Checksum = NewCRC(n.Data) commaSep := strings.LastIndex(r.URL.Path, ",") |
