[PR #4158] [CLOSED] Add WebDAV Data Connector #4544

Closed
opened 2026-02-22 18:36:02 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4158
Author: @aardel
Created: 7/15/2025
Status: Closed

Base: masterHead: master


📝 Commits (5)

  • a2b84c4 Add WebDAV connector with authentication fixes
  • b615016 Enhance WebDAV connector security and error handling
  • de17528 Fix WebDAV connector dependencies and deployment issues
  • 8b9714e Fix deployment issues and clean up development artifacts
  • c93d96c Apply Ubuntu server compatibility fixes for WebDAV connector

📊 Changes

25 files changed (+39108 additions, -5 deletions)

View changed files

WEBDAV_CONNECTOR.md (+154 -0)
📝 collector/extensions/index.js (+40 -0)
collector/package-lock.json (+8224 -0)
📝 collector/package.json (+1 -0)
collector/storage/comkey/ipc-priv.pem (+27 -0)
collector/storage/comkey/ipc-pub.pem (+8 -0)
collector/utils/extensions/WebDAV/index.js (+290 -0)
frontend/package-lock.json (+7761 -0)
📝 frontend/src/components/DataConnectorOption/media/index.js (+2 -0)
frontend/src/components/DataConnectorOption/media/webdav.svg (+5 -0)
frontend/src/components/Modals/ManageWorkspace/DataConnectors/Connectors/WebDAV/index.jsx (+378 -0)
📝 frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx (+7 -0)
frontend/src/contexts/WorkspaceContext.jsx (+52 -0)
📝 frontend/src/locales/en/common.js (+19 -0)
📝 frontend/src/models/dataConnector.js (+91 -0)
📝 frontend/vite.config.js (+19 -1)
package-lock.json (+3731 -0)
server/.env.development.backup (+338 -0)
server/.env.development.backup.20250715_072816 (+338 -0)
📝 server/endpoints/extensions/index.js (+123 -4)

...and 5 more files

📄 Description

Summary

This PR adds a new WebDAV data connector to AnythingLLM, enabling users to connect to WebDAV servers (Nextcloud, ownCloud, etc.) and import documents for processing.

Features Added

  • 🔗 WebDAV Server Integration - Connect to any WebDAV-compatible server
  • 🔐 Authentication Support - Username/password authentication with secure credential storage
  • 📁 Folder Browsing - Browse and select specific folders from WebDAV server
  • 🎯 File Type Filtering - Support for PDF, TXT, MD, DOCX, XLSX, CSV, HTML, JSON files
  • 🔄 Recursive Scanning - Option to scan subdirectories recursively
  • 💾 Settings Persistence - Save and load WebDAV configuration
  • Connection Testing - Test connectivity before importing documents

Technical Implementation

Backend Changes

  • New WebDAV Extension: collector/utils/extensions/WebDAV/index.js
    • WebDAV client implementation using HTTP requests
    • Folder listing and file discovery
    • Document processing and text extraction
  • Server Endpoints: server/endpoints/extensions/index.js
    • /api/ext/webdav - Document collection endpoint
    • /api/ext/webdav/test - Connection testing endpoint
    • /api/ext/webdav/settings - Configuration management endpoints
    • Proper authentication and role-based access control

Frontend Changes

  • WebDAV Connector UI: frontend/src/components/Modals/ManageWorkspace/DataConnectors/Connectors/WebDAV/index.jsx
    • Clean, intuitive interface matching existing connector patterns
    • Real-time connection testing with folder selection
    • Form validation and error handling
    • Settings persistence and loading
  • API Integration: frontend/src/models/dataConnector.js
    • WebDAV-specific API methods (saveSettings, loadSettings, testConnection, collect)
    • Proper header configuration and error handling
  • UI Integration: Updated DataConnectors component and media assets

Bug Fixes Included

  • 🔧 Fixed Content-Type Headers - Resolved API request parsing issues
  • 🔧 JWT Authentication Flow - Proper token handling for WebDAV endpoints
  • 🔧 Request Body Parsing - Fixed server-side request processing
  • 🔧 Proxy Configuration - Development environment API routing

Use Cases

  • Personal Cloud Storage - Import documents from Nextcloud/ownCloud personal instances
  • Enterprise Document Management - Connect to corporate WebDAV servers
  • Cross-Platform Compatibility - Works with any WebDAV-compliant server
  • Bulk Document Processing - Import entire directory structures for AI processing

Testing

  • Tested with Nextcloud WebDAV server
  • Authentication flow verified
  • Folder browsing and selection working
  • Document import and processing confirmed
  • Error handling and edge cases covered
  • Settings persistence and loading verified

Files Changed

New Files

  • WEBDAV_CONNECTOR.md - Documentation and setup guide
  • collector/utils/extensions/WebDAV/index.js - Backend WebDAV logic
  • frontend/src/components/Modals/ManageWorkspace/DataConnectors/Connectors/WebDAV/index.jsx - Frontend UI
  • frontend/src/components/DataConnectorOption/media/webdav.svg - WebDAV icon

Modified Files

  • frontend/src/models/dataConnector.js - WebDAV API methods
  • server/endpoints/extensions/index.js - WebDAV server endpoints
  • frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx - UI integration
  • frontend/vite.config.js - Development proxy configuration
  • frontend/src/locales/en/common.js - Localization strings
  • frontend/src/components/DataConnectorOption/media/index.js - Icon registration

Backward Compatibility

  • No breaking changes to existing functionality
  • All existing data connectors remain unaffected
  • Optional feature that doesn't impact core system
  • Follows existing architectural patterns

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/4158 **Author:** [@aardel](https://github.com/aardel) **Created:** 7/15/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (5) - [`a2b84c4`](https://github.com/Mintplex-Labs/anything-llm/commit/a2b84c44d4d7589ccb11f49cbbde3ecee374cb88) Add WebDAV connector with authentication fixes - [`b615016`](https://github.com/Mintplex-Labs/anything-llm/commit/b615016005e8aec1b73f327c582ebf1b85577d27) Enhance WebDAV connector security and error handling - [`de17528`](https://github.com/Mintplex-Labs/anything-llm/commit/de1752886172bbb887fda9fb6f8eb752ac19076e) Fix WebDAV connector dependencies and deployment issues - [`8b9714e`](https://github.com/Mintplex-Labs/anything-llm/commit/8b9714e1ab0182cc19ae7aa9dc741e2de9258a64) Fix deployment issues and clean up development artifacts - [`c93d96c`](https://github.com/Mintplex-Labs/anything-llm/commit/c93d96cddcd21ae18d598d39fa9302ad09020b85) Apply Ubuntu server compatibility fixes for WebDAV connector ### 📊 Changes **25 files changed** (+39108 additions, -5 deletions) <details> <summary>View changed files</summary> ➕ `WEBDAV_CONNECTOR.md` (+154 -0) 📝 `collector/extensions/index.js` (+40 -0) ➕ `collector/package-lock.json` (+8224 -0) 📝 `collector/package.json` (+1 -0) ➕ `collector/storage/comkey/ipc-priv.pem` (+27 -0) ➕ `collector/storage/comkey/ipc-pub.pem` (+8 -0) ➕ `collector/utils/extensions/WebDAV/index.js` (+290 -0) ➕ `frontend/package-lock.json` (+7761 -0) 📝 `frontend/src/components/DataConnectorOption/media/index.js` (+2 -0) ➕ `frontend/src/components/DataConnectorOption/media/webdav.svg` (+5 -0) ➕ `frontend/src/components/Modals/ManageWorkspace/DataConnectors/Connectors/WebDAV/index.jsx` (+378 -0) 📝 `frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx` (+7 -0) ➕ `frontend/src/contexts/WorkspaceContext.jsx` (+52 -0) 📝 `frontend/src/locales/en/common.js` (+19 -0) 📝 `frontend/src/models/dataConnector.js` (+91 -0) 📝 `frontend/vite.config.js` (+19 -1) ➕ `package-lock.json` (+3731 -0) ➕ `server/.env.development.backup` (+338 -0) ➕ `server/.env.development.backup.20250715_072816` (+338 -0) 📝 `server/endpoints/extensions/index.js` (+123 -4) _...and 5 more files_ </details> ### 📄 Description ## Summary This PR adds a new WebDAV data connector to AnythingLLM, enabling users to connect to WebDAV servers (Nextcloud, ownCloud, etc.) and import documents for processing. ## Features Added - 🔗 **WebDAV Server Integration** - Connect to any WebDAV-compatible server - 🔐 **Authentication Support** - Username/password authentication with secure credential storage - 📁 **Folder Browsing** - Browse and select specific folders from WebDAV server - 🎯 **File Type Filtering** - Support for PDF, TXT, MD, DOCX, XLSX, CSV, HTML, JSON files - 🔄 **Recursive Scanning** - Option to scan subdirectories recursively - 💾 **Settings Persistence** - Save and load WebDAV configuration - ✅ **Connection Testing** - Test connectivity before importing documents ## Technical Implementation ### Backend Changes - **New WebDAV Extension**: `collector/utils/extensions/WebDAV/index.js` - WebDAV client implementation using HTTP requests - Folder listing and file discovery - Document processing and text extraction - **Server Endpoints**: `server/endpoints/extensions/index.js` - `/api/ext/webdav` - Document collection endpoint - `/api/ext/webdav/test` - Connection testing endpoint - `/api/ext/webdav/settings` - Configuration management endpoints - Proper authentication and role-based access control ### Frontend Changes - **WebDAV Connector UI**: `frontend/src/components/Modals/ManageWorkspace/DataConnectors/Connectors/WebDAV/index.jsx` - Clean, intuitive interface matching existing connector patterns - Real-time connection testing with folder selection - Form validation and error handling - Settings persistence and loading - **API Integration**: `frontend/src/models/dataConnector.js` - WebDAV-specific API methods (saveSettings, loadSettings, testConnection, collect) - Proper header configuration and error handling - **UI Integration**: Updated DataConnectors component and media assets ### Bug Fixes Included - 🔧 **Fixed Content-Type Headers** - Resolved API request parsing issues - 🔧 **JWT Authentication Flow** - Proper token handling for WebDAV endpoints - 🔧 **Request Body Parsing** - Fixed server-side request processing - 🔧 **Proxy Configuration** - Development environment API routing ## Use Cases - **Personal Cloud Storage** - Import documents from Nextcloud/ownCloud personal instances - **Enterprise Document Management** - Connect to corporate WebDAV servers - **Cross-Platform Compatibility** - Works with any WebDAV-compliant server - **Bulk Document Processing** - Import entire directory structures for AI processing ## Testing - ✅ Tested with Nextcloud WebDAV server - ✅ Authentication flow verified - ✅ Folder browsing and selection working - ✅ Document import and processing confirmed - ✅ Error handling and edge cases covered - ✅ Settings persistence and loading verified ## Files Changed ### New Files - `WEBDAV_CONNECTOR.md` - Documentation and setup guide - `collector/utils/extensions/WebDAV/index.js` - Backend WebDAV logic - `frontend/src/components/Modals/ManageWorkspace/DataConnectors/Connectors/WebDAV/index.jsx` - Frontend UI - `frontend/src/components/DataConnectorOption/media/webdav.svg` - WebDAV icon ### Modified Files - `frontend/src/models/dataConnector.js` - WebDAV API methods - `server/endpoints/extensions/index.js` - WebDAV server endpoints - `frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx` - UI integration - `frontend/vite.config.js` - Development proxy configuration - `frontend/src/locales/en/common.js` - Localization strings - `frontend/src/components/DataConnectorOption/media/index.js` - Icon registration ## Backward Compatibility - ✅ No breaking changes to existing functionality - ✅ All existing data connectors remain unaffected - ✅ Optional feature that doesn't impact core system - ✅ Follows existing architectural patterns 🤖 Generated with [Claude Code](https://claude.ai/code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:36:02 -05:00
yindo closed this issue 2026-02-22 18:36:02 -05:00
yindo changed title from [PR #4158] Add WebDAV Data Connector to [PR #4158] [CLOSED] Add WebDAV Data Connector 2026-06-05 15:19:06 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4544