diff --git a/internal/api/file_orientation.go b/internal/api/file_orientation.go index 5bcd75990..1f37f977a 100644 --- a/internal/api/file_orientation.go +++ b/internal/api/file_orientation.go @@ -32,7 +32,7 @@ func ChangeFileOrientation(router *gin.RouterGroup) { // Abort in read-only mode or if editing is disabled. if conf.ReadOnly() || !conf.Settings().Features.Edit { - Abort(c, http.StatusForbidden, i18n.ErrReadOnly) + c.AbortWithStatusJSON(http.StatusForbidden, i18n.NewResponse(http.StatusForbidden, i18n.ErrReadOnly)) return } else if conf.DisableExifTool() { c.AbortWithStatusJSON(http.StatusInternalServerError, "exiftool is disabled") diff --git a/internal/photoprism/mediafile_thumbs.go b/internal/photoprism/mediafile_thumbs.go index 9ab9c3210..a12a20264 100644 --- a/internal/photoprism/mediafile_thumbs.go +++ b/internal/photoprism/mediafile_thumbs.go @@ -160,11 +160,11 @@ func (m *MediaFile) CreateThumbnails(thumbPath string, force bool) (err error) { func (m *MediaFile) ChangeOrientation(val int) (err error) { if !m.IsPreviewImage() { // Skip. - return fmt.Errorf("not a preview image") + return fmt.Errorf("orientation can currently only be changed for jpeg and png files") } cnf := Config() - cmd := exec.Command(cnf.ExifToolBin(), "-overwrite_original", "-P", "-n", "-ModifyDate