Update how whitespaces are handled in existing URLs

This commit is contained in:
Serkan Reis 2023-07-17 11:21:21 +03:00
parent 1e84b456a6
commit 17935bfb7d
4 changed files with 12 additions and 12 deletions

View File

@ -106,8 +106,8 @@ export const ImageUploadDetails = ({ onChange, mintRule }: ImageUploadDetailsPro
.replace(/,/g, '')
.replace(/"/g, '')
.replace(/'/g, '')
.replace(/ /g, '')
.replace(regex, ''),
.replace(regex, '')
.trim(),
}
onChange(data)
} catch (error: any) {

View File

@ -239,15 +239,15 @@ export const UploadDetails = ({ onChange, minterType, baseMinterAcquisitionMetho
.replace(/,/g, '')
.replace(/"/g, '')
.replace(/'/g, '')
.replace(/ /g, '')
.replace(regex, ''),
.replace(regex, '')
.trim(),
imageUrl: coverImageUrlState.value
.replace('IPFS://', 'ipfs://')
.replace(/,/g, '')
.replace(/"/g, '')
.replace(/'/g, '')
.replace(/ /g, '')
.replace(regex, ''),
.replace(regex, '')
.trim(),
baseMinterMetadataFile,
}
onChange(data)

View File

@ -115,8 +115,8 @@ export const ImageUploadDetails = ({ onChange }: ImageUploadDetailsProps) => {
.replace(/,/g, '')
.replace(/"/g, '')
.replace(/'/g, '')
.replace(/ /g, '')
.replace(regex, ''),
.replace(regex, '')
.trim(),
coverImageUrl: coverImageUrlState.value.trim(),
}
onChange(data)

View File

@ -194,15 +194,15 @@ export const OffChainMetadataUploadDetails = ({
.replace(/,/g, '')
.replace(/"/g, '')
.replace(/'/g, '')
.replace(/ /g, '')
.replace(regex, ''),
.replace(regex, '')
.trim(),
imageUrl: coverImageUrlState.value
.replace('IPFS://', 'ipfs://')
.replace(/,/g, '')
.replace(/"/g, '')
.replace(/'/g, '')
.replace(/ /g, '')
.replace(regex, ''),
.replace(regex, '')
.trim(),
openEditionMinterMetadataFile,
}
onChange(data)