Add new strategy for image resize.

This commit is contained in:
zicla
2018-11-23 14:08:10 +08:00
parent ea9c66f7b2
commit f916e24bf4
2 changed files with 83 additions and 32 deletions

View File

@ -435,9 +435,9 @@ func (this *AlienController) Download(writer http.ResponseWriter, request *http.
}
}
//对图片做缩放处理。
imageProcess := request.FormValue("imageProcess")
if imageProcess == "resize" {
//对图片处理。
needProcess, _, _, _ := this.imageCacheService.ResizeParams(request)
if needProcess {
//如果是图片,那么能用缓存就用缓存
imageCache := this.imageCacheDao.FindByUri(request.RequestURI)