mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-18 11:36:44 +08:00
Feat: Add Webdav storage as data source (#11422)
### What problem does this PR solve? This PR adds webdav storage as data source for data sync service. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -12,6 +12,7 @@ export enum DataSourceKey {
|
||||
MOODLE = 'moodle',
|
||||
// GMAIL = 'gmail',
|
||||
JIRA = 'jira',
|
||||
WEBDAV = 'webdav',
|
||||
DROPBOX = 'dropbox',
|
||||
// SHAREPOINT = 'sharepoint',
|
||||
// SLACK = 'slack',
|
||||
@ -54,6 +55,11 @@ export const DataSourceInfo = {
|
||||
description: t(`setting.${DataSourceKey.JIRA}Description`),
|
||||
icon: <SvgIcon name={'data-source/jira'} width={38} />,
|
||||
},
|
||||
[DataSourceKey.WEBDAV]: {
|
||||
name: 'WebDAV',
|
||||
description: t(`setting.${DataSourceKey.WEBDAV}Description`),
|
||||
icon: <SvgIcon name={'data-source/webdav'} width={38} />,
|
||||
},
|
||||
[DataSourceKey.DROPBOX]: {
|
||||
name: 'Dropbox',
|
||||
description: t(`setting.${DataSourceKey.DROPBOX}Description`),
|
||||
@ -429,6 +435,35 @@ export const DataSourceFormFields = {
|
||||
tooltip: t('setting.jiraPasswordTip'),
|
||||
},
|
||||
],
|
||||
[DataSourceKey.WEBDAV]: [
|
||||
{
|
||||
label: 'WebDAV Server URL',
|
||||
name: 'config.base_url',
|
||||
type: FormFieldType.Text,
|
||||
required: true,
|
||||
placeholder: 'https://webdav.example.com',
|
||||
},
|
||||
{
|
||||
label: 'Username',
|
||||
name: 'config.credentials.username',
|
||||
type: FormFieldType.Text,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
label: 'Password',
|
||||
name: 'config.credentials.password',
|
||||
type: FormFieldType.Password,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
label: 'Remote Path',
|
||||
name: 'config.remote_path',
|
||||
type: FormFieldType.Text,
|
||||
required: false,
|
||||
placeholder: '/',
|
||||
tooltip: t('setting.webdavRemotePathTip'),
|
||||
},
|
||||
],
|
||||
[DataSourceKey.DROPBOX]: [
|
||||
{
|
||||
label: 'Access Token',
|
||||
@ -546,6 +581,18 @@ export const DataSourceFormDefaultValues = {
|
||||
},
|
||||
},
|
||||
},
|
||||
[DataSourceKey.WEBDAV]: {
|
||||
name: '',
|
||||
source: DataSourceKey.WEBDAV,
|
||||
config: {
|
||||
base_url: '',
|
||||
remote_path: '/',
|
||||
credentials: {
|
||||
username: '',
|
||||
password: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
[DataSourceKey.DROPBOX]: {
|
||||
name: '',
|
||||
source: DataSourceKey.DROPBOX,
|
||||
|
||||
Reference in New Issue
Block a user