Browse Source
Merge pull request #719 from zhangmingfeng/master
Update volume_server_handlers_read.go
pull/729/head
Chris Lu
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
weed/server/volume_server_handlers_read.go
|
@ -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 { |
|
|
func conditionallyResizeImages(originalDataReaderSeeker io.ReadSeeker, ext string, r *http.Request) io.ReadSeeker { |
|
|
rs := originalDataReaderSeeker |
|
|
rs := originalDataReaderSeeker |
|
|
|
|
|
if len(ext) > 0 { |
|
|
|
|
|
ext = strings.ToLower(ext) |
|
|
|
|
|
} |
|
|
if ext == ".png" || ext == ".jpg" || ext == ".jpeg" || ext == ".gif" { |
|
|
if ext == ".png" || ext == ".jpg" || ext == ".jpeg" || ext == ".gif" { |
|
|
width, height := 0, 0 |
|
|
width, height := 0, 0 |
|
|
if r.FormValue("width") != "" { |
|
|
if r.FormValue("width") != "" { |
|
|