mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: add addressing style config for S3-compatible storage (#11510)
### Type of change * [x] New Feature (non-breaking change which adds functionality) Add support for Virtual Hosted Style and Path Style URL addressing in S3_COMPATIBLE storage connector. Default to Virtual Hosted Style for better compatibility with COS and other S3-compatible services. - Add addressing_style field to credentials (virtual/path) - Update frontend form with selection dropdown - Add validation and tooltips for S3 Compatible endpoint URL <img width="703" height="875" alt="image" src="https://github.com/user-attachments/assets/af5ba7ca-f160-47fa-8ba1-32eace8f5fdf" /> <img width="1620" height="788" alt="image" src="https://github.com/user-attachments/assets/6012b5ce-8bcb-478e-a9cb-425f886d5046" /> --------- Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
@ -121,6 +121,21 @@ export const DataSourceFormFields = {
|
||||
],
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
label: 'Addressing Style',
|
||||
name: 'config.credentials.addressing_style',
|
||||
type: FormFieldType.Select,
|
||||
options: [
|
||||
{ label: 'Virtual Hosted Style', value: 'virtual' },
|
||||
{ label: 'Path Style', value: 'path' },
|
||||
],
|
||||
required: false,
|
||||
placeholder: 'Virtual Hosted Style',
|
||||
tooltip: t('setting.S3CompatibleAddressingStyleTip'),
|
||||
shouldRender: (formValues: any) => {
|
||||
return formValues?.config?.bucket_type === 's3_compatible';
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Endpoint URL',
|
||||
name: 'config.credentials.endpoint_url',
|
||||
@ -444,6 +459,7 @@ export const DataSourceFormDefaultValues = {
|
||||
aws_access_key_id: '',
|
||||
aws_secret_access_key: '',
|
||||
endpoint_url: '',
|
||||
addressing_style: 'virtual',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user