mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
feat: use real image path to calculate cache key
This commit is contained in:
parent
cf85404dd2
commit
c1987237d0
3 changed files with 18 additions and 5 deletions
|
|
@ -185,6 +185,19 @@ func (i *FileInfo) Checksum(algo string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (i *FileInfo) RealPath() string {
|
||||
if realPathFs, ok := i.Fs.(interface {
|
||||
RealPath(name string) (fPath string, err error)
|
||||
}); ok {
|
||||
realPath, err := realPathFs.RealPath(i.Path)
|
||||
if err == nil {
|
||||
return realPath
|
||||
}
|
||||
}
|
||||
|
||||
return i.Path
|
||||
}
|
||||
|
||||
//nolint:goconst
|
||||
//TODO: use constants
|
||||
func (i *FileInfo) detectType(modify, saveContent, readHeader bool) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue