mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
bug adding file to chat on ios solved
This commit is contained in:
@@ -263,5 +263,17 @@ export class FileService {
|
||||
return new File([u8arr], filename, {type:mime});
|
||||
}
|
||||
|
||||
base64toBlobIos(base64Data, contentType) {
|
||||
contentType = contentType || '';
|
||||
const byteCharacters = atob(base64Data);
|
||||
const byteArray = new Uint8Array(byteCharacters.length);
|
||||
|
||||
for (let i = 0; i < byteCharacters.length; i++) {
|
||||
byteArray[i] = byteCharacters.charCodeAt(i);
|
||||
}
|
||||
|
||||
return new Blob([byteArray], { type: contentType });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user