mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-10 01:02:15 +01:00
fix cleanup of base64 string for zips
This commit is contained in:
@@ -48,7 +48,10 @@ async function importData() {
|
||||
);
|
||||
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();
|
||||
if (organizationId !== null) {
|
||||
const { handleApiRequestNotifications } = useNotificationsStore();
|
||||
@@ -57,7 +60,7 @@ async function importData() {
|
||||
api.importData(
|
||||
{
|
||||
type: importType.value.key,
|
||||
data: base64String.replace('data:text/csv;base64,', ''),
|
||||
data: base64String,
|
||||
},
|
||||
{
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user