filtering all except png and jpg

This commit is contained in:
Philipp Häfelfinger 2019-02-28 22:30:58 +01:00
parent a4a6cce943
commit 958631df5d

View File

@ -26,7 +26,10 @@ func ScanLocalFileStructure(path string) (map[string]*FilesystemNode, error) {
return nil return nil
} }
//TODO: Only allow jpg and png files here extension := strings.ToLower(filepath.Ext(path))
if extension != ".jpg" && extension != ".png" {
return nil
}
key := strings.Replace(path, fullPathReplace, "", 1) key := strings.Replace(path, fullPathReplace, "", 1)