mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48:49 +01:00
🎨 Improve S3/WebDAV endpoint setting https://ld246.com/article/1736518497899
This commit is contained in:
parent
37849aaef0
commit
e9839200c0
1 changed files with 8 additions and 8 deletions
|
|
@ -317,17 +317,17 @@ const bindProviderEvent = () => {
|
|||
}
|
||||
(providerPanelElement.querySelector("#timeout") as HTMLInputElement).value = timeout.toString();
|
||||
let endpoint = (providerPanelElement.querySelector("#endpoint") as HTMLInputElement).value;
|
||||
endpoint = endpoint.replace("http://http(s)://", "http://");
|
||||
endpoint = endpoint.trim().replace("http://http(s)://", "https://");
|
||||
if (!endpoint.startsWith("http")) {
|
||||
endpoint = "http://" + endpoint;
|
||||
}
|
||||
const s3 = {
|
||||
endpoint: endpoint,
|
||||
accessKey: (providerPanelElement.querySelector("#accessKey") as HTMLInputElement).value,
|
||||
secretKey: (providerPanelElement.querySelector("#secretKey") as HTMLInputElement).value,
|
||||
bucket: (providerPanelElement.querySelector("#bucket") as HTMLInputElement).value,
|
||||
accessKey: (providerPanelElement.querySelector("#accessKey") as HTMLInputElement).value.trim(),
|
||||
secretKey: (providerPanelElement.querySelector("#secretKey") as HTMLInputElement).value.trim(),
|
||||
bucket: (providerPanelElement.querySelector("#bucket") as HTMLInputElement).value.trim(),
|
||||
pathStyle: (providerPanelElement.querySelector("#pathStyle") as HTMLInputElement).value === "true",
|
||||
region: (providerPanelElement.querySelector("#region") as HTMLInputElement).value,
|
||||
region: (providerPanelElement.querySelector("#region") as HTMLInputElement).value.trim(),
|
||||
skipTlsVerify: (providerPanelElement.querySelector("#s3SkipTlsVerify") as HTMLInputElement).value === "true",
|
||||
timeout: timeout,
|
||||
concurrentReqs: concurrentReqs,
|
||||
|
|
@ -352,14 +352,14 @@ const bindProviderEvent = () => {
|
|||
}
|
||||
(providerPanelElement.querySelector("#timeout") as HTMLInputElement).value = timeout.toString();
|
||||
let endpoint = (providerPanelElement.querySelector("#endpoint") as HTMLInputElement).value;
|
||||
endpoint = endpoint.replace("http://http(s)://", "http://");
|
||||
endpoint = endpoint.trim().replace("http://http(s)://", "https://");
|
||||
if (!endpoint.startsWith("http")) {
|
||||
endpoint = "http://" + endpoint;
|
||||
}
|
||||
const webdav = {
|
||||
endpoint: endpoint,
|
||||
username: (providerPanelElement.querySelector("#username") as HTMLInputElement).value,
|
||||
password: (providerPanelElement.querySelector("#password") as HTMLInputElement).value,
|
||||
username: (providerPanelElement.querySelector("#username") as HTMLInputElement).value.trim(),
|
||||
password: (providerPanelElement.querySelector("#password") as HTMLInputElement).value.trim(),
|
||||
skipTlsVerify: (providerPanelElement.querySelector("#webdavSkipTlsVerify") as HTMLInputElement).value === "true",
|
||||
timeout: timeout,
|
||||
concurrentReqs: concurrentReqs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue