Browse Source

fix: #2779 - strip trailing slash on s3 endpoint (#2788)

Co-authored-by: thisProjects <wibbet@wobbet.com>
pull/2790/head
Nathan 2 years ago committed by GitHub
parent
commit
32f8c06390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      web/components/admin/config/server/EditStorage.tsx

3
web/components/admin/config/server/EditStorage.tsx

@ -126,6 +126,9 @@ export default function EditStorage() {
const handleSave = async () => { const handleSave = async () => {
setSubmitStatus(createInputStatus(STATUS_PROCESSING)); setSubmitStatus(createInputStatus(STATUS_PROCESSING));
const postValue = formDataValues; const postValue = formDataValues;
if (postValue?.servingEndpoint) {
postValue.servingEndpoint = postValue?.servingEndpoint?.replace(/\/+$/g, '');
}
await postConfigUpdateToAPI({ await postConfigUpdateToAPI({
apiPath: API_S3_INFO, apiPath: API_S3_INFO,

Loading…
Cancel
Save