mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-09 19:52:30 +02:00
* imagetype (new) -> imagetype * Always fallback in C-D, GetTypeMap -> GetTypeByName * Do not send origin ContentType
24 lines
454 B
Go
24 lines
454 B
Go
package imagetype
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
|
)
|
|
|
|
type (
|
|
UnknownFormatError struct{}
|
|
)
|
|
|
|
func newUnknownFormatError() error {
|
|
return ierrors.Wrap(
|
|
UnknownFormatError{},
|
|
1,
|
|
ierrors.WithStatusCode(http.StatusUnprocessableEntity),
|
|
ierrors.WithPublicMessage("Invalid source image"),
|
|
ierrors.WithShouldReport(false),
|
|
)
|
|
}
|
|
|
|
func (e UnknownFormatError) Error() string { return "Source image type not supported" }
|