0

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

Co-authored-by: thisProjects <wibbet@wobbet.com>
This commit is contained in:
Nathan 2023-03-10 22:05:54 +00:00 committed by GitHub
parent 0aefe9faf5
commit 32f8c06390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,