mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix: theme exports and imports sometimes failing due to attached images
This commit is contained in:
@@ -28,7 +28,12 @@ const shareTheme = async (themeID: string) => {
|
||||
// Helper function to convert Blob to Base64
|
||||
const blobToBase64 = (blob: Blob) => new Promise<string>((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
reader.onloadend = () => resolve(reader.result as string);
|
||||
reader.onloadend = () => {
|
||||
const base64String = reader.result as string;
|
||||
// Extract just the base64 data without the data URL prefix
|
||||
const base64Data = base64String.split(',')[1];
|
||||
resolve(base64Data);
|
||||
};
|
||||
reader.onerror = reject;
|
||||
reader.readAsDataURL(blob);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user