Numerous Bug Fixes
Some checks failed
Automated Container Build / build-and-push (push) Failing after 8s
Some checks failed
Automated Container Build / build-and-push (push) Failing after 8s
This commit is contained in:
parent
02eefdac0e
commit
267d429122
959 changed files with 145571 additions and 221 deletions
|
|
@ -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.)
|
||||
|
|
|
|||
Reference in a new issue