1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-11-29 23:07:40 +02:00

Precheck vips image types support

This commit is contained in:
DarthSim
2017-10-07 02:54:24 +06:00
parent c4d1f4b54f
commit c72c86a921
3 changed files with 27 additions and 28 deletions

View File

@@ -77,7 +77,7 @@ func parsePath(r *http.Request) (string, processingOptions, error) {
return "", po, fmt.Errorf("Invalid image format: %s", filenameParts[1])
}
if !vipsTypeSupportedSave(po.format) {
if !vipsTypeSupportSave[po.format] {
return "", po, errors.New("Resulting image type not supported")
}