unset region per user request
This commit is contained in:
parent
29a3c76b4e
commit
942e54961e
@ -163,7 +163,7 @@
|
||||
"settings_s3_prod3": "Configuring CORS",
|
||||
"settings_s3_endpoint": "Endpoint",
|
||||
"settings_s3_region": "Region",
|
||||
"settings_s3_region_desc": "If you are not sure what to enter, you could try the value: us-east-1",
|
||||
"settings_s3_region_desc": "If you are not sure what to enter, you could try the value: us-east-1 . If you leave it empty, the client will try to ignore this setting.",
|
||||
"settings_s3_accesskeyid": "Access Key ID",
|
||||
"settings_s3_accesskeyid_desc": "Access key ID. Attention: Access key ID and other info are saved locally.",
|
||||
"settings_s3_secretaccesskey": "Secret Access Key",
|
||||
|
||||
@ -163,7 +163,7 @@
|
||||
"settings_s3_prod3": "设置 CORS",
|
||||
"settings_s3_endpoint": "服务地址(Endpoint)",
|
||||
"settings_s3_region": "区域(Region)",
|
||||
"settings_s3_region_desc": "如果您不知道这个值填什么,可以尝试填写此默认值:us-east-1",
|
||||
"settings_s3_region_desc": "如果您不知道这个值填什么,可以尝试填写:us-east-1。如果您不填写,客户端会尝试不设置此选项。",
|
||||
"settings_s3_accesskeyid": "Access Key ID",
|
||||
"settings_s3_accesskeyid_desc": "Access key ID。注意:access key ID 和其它信息都会在本地保存。",
|
||||
"settings_s3_secretaccesskey": "Secret Access Key",
|
||||
|
||||
@ -163,7 +163,7 @@
|
||||
"settings_s3_prod3": "設定 CORS",
|
||||
"settings_s3_endpoint": "服務地址(Endpoint)",
|
||||
"settings_s3_region": "區域(Region)",
|
||||
"settings_s3_region_desc": "如果您不知道這個值填什麼,可以嘗試填寫此預設值:us-east-1",
|
||||
"settings_s3_region_desc": "如果您不知道這個值填什麼,可以嘗試填寫:us-east-1。如果您不填寫,客戶端會嘗試不設定此選項。",
|
||||
"settings_s3_accesskeyid": "Access Key ID",
|
||||
"settings_s3_accesskeyid_desc": "Access key ID。注意:access key ID 和其它資訊都會在本地儲存。",
|
||||
"settings_s3_secretaccesskey": "Secret Access Key",
|
||||
|
||||
@ -277,7 +277,7 @@ export const getS3Client = (s3Config: S3Config) => {
|
||||
|
||||
if (VALID_REQURL && s3Config.bypassCorsLocally) {
|
||||
s3Client = new S3Client({
|
||||
region: s3Config.s3Region,
|
||||
region: s3Config.s3Region !== "" ? s3Config.s3Region : undefined,
|
||||
endpoint: endpoint,
|
||||
forcePathStyle: s3Config.forcePathStyle,
|
||||
credentials: {
|
||||
@ -288,7 +288,7 @@ export const getS3Client = (s3Config: S3Config) => {
|
||||
});
|
||||
} else {
|
||||
s3Client = new S3Client({
|
||||
region: s3Config.s3Region,
|
||||
region: s3Config.s3Region !== "" ? s3Config.s3Region : undefined,
|
||||
endpoint: endpoint,
|
||||
forcePathStyle: s3Config.forcePathStyle,
|
||||
credentials: {
|
||||
|
||||
@ -1015,13 +1015,13 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
.setDesc(t("settings_s3_accuratemtime_desc"))
|
||||
.addDropdown((dropdown) => {
|
||||
dropdown
|
||||
.addOption("disable", t("disable"))
|
||||
.addOption("enable", t("enable"));
|
||||
.addOption("disable", t("disable"))
|
||||
.addOption("enable", t("enable"));
|
||||
|
||||
dropdown
|
||||
.setValue(`${
|
||||
this.plugin.settings.s3.useAccurateMTime ? "enable" : "disable"
|
||||
}`)
|
||||
.setValue(
|
||||
`${this.plugin.settings.s3.useAccurateMTime ? "enable" : "disable"}`
|
||||
)
|
||||
.onChange(async (val) => {
|
||||
if (val === "enable") {
|
||||
this.plugin.settings.s3.useAccurateMTime = true;
|
||||
@ -1032,7 +1032,6 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
let newS3RemotePrefix = this.plugin.settings.s3.remotePrefix || "";
|
||||
new Setting(s3Div)
|
||||
.setName(t("settings_remoteprefix"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user