mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-24 06:50:25 +02:00
[#87] added additional thumb resizers
This commit is contained in:
1 parent
a516435f2e
commit
efda3d5a0b
39 files changed
+343
-192
No files matched your search
+1
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user