[#87] added additional thumb resizers

This commit is contained in:
Gani Georgiev committed 2022-08-17 22:29:47 +03:00
1 parent a516435f2e
commit efda3d5a0b
39 files changed
+343 -192

No files matched your search

+1 -1
View File
@@ -78,7 +78,7 @@ func (api *fileApi) download(c echo.Context) error {
// - if exists - compare last modified dates to determine whether the thumb should be recreated
tAttrs, tAttrsErr := fs.Attributes(servedPath)
if tAttrsErr != nil || oAttrs.ModTime.After(tAttrs.ModTime) {
if err := fs.CreateThumb(originalPath, servedPath, thumbSize, false); err != nil {
if err := fs.CreateThumb(originalPath, servedPath, thumbSize); err != nil {
servedPath = originalPath // fallback to the original
}
}