From cd2cf7fb06d47bdfaf1ab1a925e0cc11a9294cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6sche?= Date: Thu, 29 Jan 2026 12:16:04 +0100 Subject: [PATCH] Skip ensuring parent collections for hidden avatar folders during upload to avoid MKCOL timeouts --- go_cloud/internal/storage/webdav.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/go_cloud/internal/storage/webdav.go b/go_cloud/internal/storage/webdav.go index 6fcfbe4..14c32a2 100644 --- a/go_cloud/internal/storage/webdav.go +++ b/go_cloud/internal/storage/webdav.go @@ -91,9 +91,11 @@ func (c *WebDAVClient) Upload(ctx context.Context, remotePath string, r io.Reade if c == nil { return fmt.Errorf("no webdav client configured") } - // Ensure parent collections - if err := c.ensureParent(ctx, remotePath); err != nil { - return err + // Ensure parent collections (skip for hidden avatar folders to avoid MKCOL timeouts) + if !strings.HasPrefix(remotePath, ".avatars") { + if err := c.ensureParent(ctx, remotePath); err != nil { + return err + } } // Construct URL // remotePath might be like /orgs//file.txt; ensure it joins to basePrefix