Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'workhorse/internal/upload/exif/exif.go')
-rw-r--r--workhorse/internal/upload/exif/exif.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/workhorse/internal/upload/exif/exif.go b/workhorse/internal/upload/exif/exif.go
index 2f8218c3bc3..db3c45431c0 100644
--- a/workhorse/internal/upload/exif/exif.go
+++ b/workhorse/internal/upload/exif/exif.go
@@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"io"
+ "os"
"os/exec"
"regexp"
@@ -109,6 +110,10 @@ func (c *cleaner) startProcessing(stdin io.Reader) error {
}
func FileTypeFromSuffix(filename string) FileType {
+ if os.Getenv("SKIP_EXIFTOOL") == "1" {
+ return TypeUnknown
+ }
+
jpegMatch := regexp.MustCompile(`(?i)^[^\n]*\.(jpg|jpeg)$`)
if jpegMatch.MatchString(filename) {
return TypeJPEG