Browse Source

Merge pull request #2271 from mauroparente/master

Fix image resize
pull/2354/head
Chris Lu 3 years ago
committed by GitHub
parent
commit
02e8f00138
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      weed/server/filer_server_handlers_read.go

3
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)

Loading…
Cancel
Save