@5minds/node-red-dashboard-2-processcube-chat 0.1.1-add-functionality-043ee8-mdy8o5ki → 0.1.1-add-functionality-94845a-me8hect9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -147,7 +147,12 @@ export default {
|
|
|
147
147
|
const reader = new FileReader();
|
|
148
148
|
reader.onload = (e) => {
|
|
149
149
|
try {
|
|
150
|
-
const
|
|
150
|
+
const result = e.target.result;
|
|
151
|
+
const commaIndex = result.indexOf(',');
|
|
152
|
+
if (commaIndex === -1) {
|
|
153
|
+
throw new Error('Invalid data URL format: missing comma separator');
|
|
154
|
+
}
|
|
155
|
+
const base64Data = result.split(',')[1]; // Remove data URL prefix
|
|
151
156
|
|
|
152
157
|
resolve({
|
|
153
158
|
name: file.name,
|