diff --git a/http/preview.go b/http/preview.go index 48d4ded0..4f88ab3a 100644 --- a/http/preview.go +++ b/http/preview.go @@ -7,7 +7,7 @@ import ( "fmt" "io" "net/http" - + "path/filepath" "github.com/gorilla/mux" "github.com/filebrowser/filebrowser/v2/files" @@ -152,5 +152,6 @@ func createPreview(imgSvc ImgService, fileCache FileCache, } func previewCacheKey(fPath string, fTime int64, previewSize PreviewSize) string { + fPath = filepath.Base(fPath) return fmt.Sprintf("%x%x%x", fPath, fTime, previewSize) }