mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 04:32:15 +01:00
fix cleanup of base64 string for zips
This commit is contained in:
@@ -48,7 +48,10 @@ async function importData() {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const base64String = await toBase64(files.value[0]);
|
const rawBase64String = await toBase64(files.value[0]);
|
||||||
|
const base64String = rawBase64String
|
||||||
|
.split(';')[1]
|
||||||
|
.replace('base64,', '') as string;
|
||||||
const organizationId = getCurrentOrganizationId();
|
const organizationId = getCurrentOrganizationId();
|
||||||
if (organizationId !== null) {
|
if (organizationId !== null) {
|
||||||
const { handleApiRequestNotifications } = useNotificationsStore();
|
const { handleApiRequestNotifications } = useNotificationsStore();
|
||||||
@@ -57,7 +60,7 @@ async function importData() {
|
|||||||
api.importData(
|
api.importData(
|
||||||
{
|
{
|
||||||
type: importType.value.key,
|
type: importType.value.key,
|
||||||
data: base64String.replace('data:text/csv;base64,', ''),
|
data: base64String,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
Reference in New Issue
Block a user