mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Refactor: decide if there is a thumbnail based on the file extension
This commit is contained in:
@@ -63,6 +63,11 @@ func (fs *FileSystem) AddFile(ctx context.Context, parent *model.Folder) (*model
|
||||
FolderID: parent.ID,
|
||||
PolicyID: fs.User.Policy.ID,
|
||||
}
|
||||
|
||||
if fs.User.Policy.IsThumbExist(file.GetFileName()) {
|
||||
newFile.PicInfo = "1,1"
|
||||
}
|
||||
|
||||
_, err = newFile.Create()
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user