diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/file.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/file.go b/app/file.go index a1addd7ac..96d1caabd 100644 --- a/app/file.go +++ b/app/file.go @@ -361,6 +361,14 @@ func (a *App) DoUploadFile(now time.Time, rawTeamId string, rawChannelId string, return nil, err } + if orientation, err := getImageOrientation(bytes.NewReader(data)); err == nil && + (orientation == RotatedCWMirrored || + orientation == RotatedCCW || + orientation == RotatedCCWMirrored || + orientation == RotatedCW) { + info.Width, info.Height = info.Height, info.Width + } + info.Id = model.NewId() info.CreatorId = userId |