Skip ensuring parent collections for hidden avatar folders during upload to avoid MKCOL timeouts

This commit is contained in:
Leon Bösche
2026-01-29 12:16:04 +01:00
parent cd34bcddc9
commit cd2cf7fb06

View File

@@ -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/<id>/file.txt; ensure it joins to basePrefix