progress for file update inapp

This commit is contained in:
Julien Calixte
2023-08-20 23:55:25 +02:00
parent 767e238848
commit ccb486a0b6
6 changed files with 118 additions and 24 deletions

View File

@@ -6,3 +6,7 @@ export const decodeBase64ToUTF8 = (content: string): string => {
.join('')
)
}
export const encodeUTF8ToBase64 = (content: string): string => {
const utf8Bytes: Uint8Array = new TextEncoder().encode(content)
return btoa(String.fromCharCode(...utf8Bytes))
}