Fix: adressing style without a default value (#13009)

### What problem does this PR solve?

Fix: adressing style without a default value #12396 #11510

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Magicbook1108
2026-02-05 13:52:23 +08:00
committed by GitHub
parent 6361fc4b33
commit 1349e6b7d1
3 changed files with 3 additions and 2 deletions

View File

@ -187,6 +187,7 @@ jobs:
echo -e "EXPOSE_MYSQL_PORT=${EXPOSE_MYSQL_PORT}" >> docker/.env echo -e "EXPOSE_MYSQL_PORT=${EXPOSE_MYSQL_PORT}" >> docker/.env
echo -e "MINIO_PORT=${MINIO_PORT}" >> docker/.env echo -e "MINIO_PORT=${MINIO_PORT}" >> docker/.env
echo -e "MINIO_CONSOLE_PORT=${MINIO_CONSOLE_PORT}" >> docker/.env echo -e "MINIO_CONSOLE_PORT=${MINIO_CONSOLE_PORT}" >> docker/.env
echo -e "REDIS_PORT=${REDIS_PORT}" >> docker/.env
echo -e "TEI_PORT=${TEI_PORT}" >> docker/.env echo -e "TEI_PORT=${TEI_PORT}" >> docker/.env
echo -e "KIBANA_PORT=${KIBANA_PORT}" >> docker/.env echo -e "KIBANA_PORT=${KIBANA_PORT}" >> docker/.env
echo -e "SVR_HTTP_PORT=${SVR_HTTP_PORT}" >> docker/.env echo -e "SVR_HTTP_PORT=${SVR_HTTP_PORT}" >> docker/.env

View File

@ -315,14 +315,13 @@ def create_s3_client(bucket_type: BlobType, credentials: dict[str, Any], europea
region_name=credentials["region"], region_name=credentials["region"],
) )
elif bucket_type == BlobType.S3_COMPATIBLE: elif bucket_type == BlobType.S3_COMPATIBLE:
addressing_style = credentials.get("addressing_style", "virtual")
return boto3.client( return boto3.client(
"s3", "s3",
endpoint_url=credentials["endpoint_url"], endpoint_url=credentials["endpoint_url"],
aws_access_key_id=credentials["aws_access_key_id"], aws_access_key_id=credentials["aws_access_key_id"],
aws_secret_access_key=credentials["aws_secret_access_key"], aws_secret_access_key=credentials["aws_secret_access_key"],
config=Config(s3={'addressing_style': addressing_style}), config=Config(s3={'addressing_style': credentials["addressing_style"]}),
) )
else: else:

View File

@ -143,6 +143,7 @@ export const S3Constant = (t: TFunction) => [
tooltip: t('setting.S3CompatibleAddressingStyleTip'), tooltip: t('setting.S3CompatibleAddressingStyleTip'),
required: false, required: false,
type: FormFieldType.Select, type: FormFieldType.Select,
defaultValue: 'virtual',
options: [ options: [
{ label: 'Virtual Hosted Style', value: 'virtual' }, { label: 'Virtual Hosted Style', value: 'virtual' },
{ label: 'Path Style', value: 'path' }, { label: 'Path Style', value: 'path' },