fix: base64 convert to file for all image type
This commit is contained in:
+1
-1
@@ -153,7 +153,7 @@ export const generateRandomNumber = () => {
|
||||
|
||||
function base64ToBlob(base64: string, contentType = '', sliceSize = 512) {
|
||||
try {
|
||||
const base64Content = base64.replace(/^data:image\/(png|jpg);base64,/, '');
|
||||
const base64Content = base64.replace(/^data:image\/[^;]+;base64,/, '');
|
||||
const byteCharacters = atob(base64Content);
|
||||
const byteArrays = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user