Numerous Bug Fixes
Some checks failed
Automated Container Build / build-and-push (push) Failing after 8s

This commit is contained in:
Elijah 2026-05-22 15:50:45 -07:00
parent 02eefdac0e
commit 267d429122
959 changed files with 145571 additions and 221 deletions

View file

@ -84,13 +84,7 @@ func (h *WebDAVHandler) Handle(c *fiber.Ctx) error {
// Adapt Fiber's FastHTTP to standard net/http for the WebDAV handler
fasthttpadaptor.NewFastHTTPHandlerFunc(func(w http.ResponseWriter, r *http.Request) {
relPath := strings.TrimPrefix(r.URL.Path, "/webdav")
fullPath := filepath.Join(h.Config.StorageDir, filepath.FromSlash(relPath))
// If it's a PUT request, version the existing file before it gets overwritten
if r.Method == "PUT" {
CreateVersion(h.DB, h.Config, fullPath, filepath.ToSlash(relPath))
}
// Native WebDAV handles overwriting automatically
h.Handler.ServeHTTP(w, r)
// If it was a PUT request, we should sync it with our DB (checksum, size, etc.)