1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-08 10:07:25 +02:00

Update volume_server_handlers_read.go

change ext to lower-case
This commit is contained in:
zhangmingfeng 2018-09-03 11:01:35 +08:00 committed by GitHub
parent 88f1d32cc4
commit aafe8d84cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -185,6 +185,9 @@ func (vs *VolumeServer) tryHandleChunkedFile(n *storage.Needle, fileName string,
func conditionallyResizeImages(originalDataReaderSeeker io.ReadSeeker, ext string, r *http.Request) io.ReadSeeker {
rs := originalDataReaderSeeker
if len(ext) > 0 {
ext = strings.ToLower(ext)
}
if ext == ".png" || ext == ".jpg" || ext == ".jpeg" || ext == ".gif" {
width, height := 0, 0
if r.FormValue("width") != "" {