diff --git a/app/lib/methods/handleBase64.ts b/app/lib/methods/handleBase64.ts index 4e5171c32..90a9f634d 100644 --- a/app/lib/methods/handleBase64.ts +++ b/app/lib/methods/handleBase64.ts @@ -19,12 +19,3 @@ export function getBase64MimeType(data: string): string | undefined { return mimeType[1]; } } - -// I don't know if we should test this function, because the regex will pass through all the data on the base64 -// "maybe", depending the length of the data, will waste to much time -// https://github.com/wix/react-native-ui-lib/blob/cf700e0d65caa0a0b601fe1edbd763ad4e6748a4/src/utils/imageUtils.ts#L14-L18 -export function isImageBase64ImageContent(data: string): boolean { - const imageBase64Content = data.split(',')[1]; - const imageBase64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; - return imageBase64regex.test(imageBase64Content); -}