Browse Source
Merge pull request #2271 from mauroparente/master
Fix image resize
pull/2354/head
Chris Lu
3 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/filer_server_handlers_read.go
|
|
@ -142,6 +142,9 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) |
|
|
|
|
|
|
|
if rangeReq := r.Header.Get("Range"); rangeReq == "" { |
|
|
|
ext := filepath.Ext(filename) |
|
|
|
if len(ext) > 0 { |
|
|
|
ext = strings.ToLower(ext) |
|
|
|
} |
|
|
|
width, height, mode, shouldResize := shouldResizeImages(ext, r) |
|
|
|
if shouldResize { |
|
|
|
data, err := filer.ReadAll(fs.filer.MasterClient, entry.Chunks) |
|
|
|