Add ability to handle svg files
This commit is contained in:
@@ -21,7 +21,7 @@ func copyMedias() error {
|
||||
}
|
||||
|
||||
filepath.WalkDir("posts/", func(s string, d fs.DirEntry, err error) error {
|
||||
if filepath.Ext(s) == ".jpg" || filepath.Ext(s) == ".jpeg" || filepath.Ext(s) == ".png" || filepath.Ext(s) == ".mp4" {
|
||||
if filepath.Ext(s) == ".jpg" || filepath.Ext(s) == ".jpeg" || filepath.Ext(s) == ".png" || filepath.Ext(s) == ".mp4" || filepath.Ext(s) == ".svg" {
|
||||
newPath := strings.ReplaceAll(s, "posts/", "build/medias/")
|
||||
|
||||
if _, err := os.Stat(newPath); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user