1
0
Эх сурвалжийг харах

Disable extension checking if the `raw` processing option is used

DarthSim 2 жил өмнө
parent
commit
25459ef88c

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@
 ### Change
 - Connecting to loopback, link-local multicast, and link-local unicast IP addresses when requesting source images is prohibited by default.
 - Tuned source image downloading flow.
+- Disable extension checking if the `raw` processing option is used.
 
 ### Fix
 - (pro) Fix face detection during advanced smart crop in some cases.

+ 2 - 2
options/processing_options.go

@@ -1138,7 +1138,7 @@ func parsePathOptions(parts []string, headers http.Header) (*ProcessingOptions,
 		return nil, "", err
 	}
 
-	if len(extension) > 0 {
+	if !po.Raw && len(extension) > 0 {
 		if err = applyFormatOption(po, []string{extension}); err != nil {
 			return nil, "", err
 		}
@@ -1165,7 +1165,7 @@ func parsePathPresets(parts []string, headers http.Header) (*ProcessingOptions,
 		return nil, "", err
 	}
 
-	if len(extension) > 0 {
+	if !po.Raw && len(extension) > 0 {
 		if err = applyFormatOption(po, []string{extension}); err != nil {
 			return nil, "", err
 		}