mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Merge branch 'master' of https://github.com/chrislusf/seaweedfs
This commit is contained in:
commit
0adb2ba6b8
|
@ -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") != "" {
|
||||||
|
|
Loading…
Reference in a new issue