diff --git a/http/handler/filesystem.go b/http/handler/filesystem.go index 54435238..9e00e37c 100644 --- a/http/handler/filesystem.go +++ b/http/handler/filesystem.go @@ -90,6 +90,13 @@ func (h *FSHandler) PutFile(c echo.Context) error { if h.fs.Cache != nil { h.fs.Cache.Delete(path) + + if len(h.fs.DefaultFile) != 0 { + if strings.HasSuffix(path, "/"+h.fs.DefaultFile) { + path := strings.TrimSuffix(path, h.fs.DefaultFile) + h.fs.Cache.Delete(path) + } + } } c.Response().Header().Set("Content-Location", req.URL.RequestURI())