Skip to content

Commit f96db36

Browse files
committed
fix: apparently there are more zip file types
1 parent 6bdb409 commit f96db36

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

src/utils/imports/appleMusicService.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,16 @@ export const AppleMusicService: ImportServiceFunction = ({
5959
service: Platform.APPLEMUSIC,
6060
},
6161
]);
62-
} else if (file.type === 'application/zip') {
62+
} else if (
63+
[
64+
'application/zip',
65+
'application/x-zip-compressed',
66+
'application/x-zip',
67+
'application/zip-compressed',
68+
'application/octet-stream',
69+
'multipart/x-zip',
70+
].includes(file.type)
71+
) {
6372
toaster.message('Processing ZIP file');
6473
const zipReader = new ZipReader(new BlobReader(file));
6574
const entries = await zipReader.getEntries();

src/utils/imports/spotifyService.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,16 @@ export const SpotifyService: ImportServiceFunction = ({
186186
{ name: file.name, content, id },
187187
{ event, setUploadedFiles },
188188
);
189-
} else if (file.type === 'application/zip') {
189+
} else if (
190+
[
191+
'application/zip',
192+
'application/x-zip-compressed',
193+
'application/x-zip',
194+
'application/zip-compressed',
195+
'application/octet-stream',
196+
'multipart/x-zip',
197+
].includes(file.type)
198+
) {
190199
const zipReader = new ZipReader(new BlobReader(file));
191200
const entries = await zipReader.getEntries();
192201
const filesToImport: { name: string; content: string; id: string }[] =

0 commit comments

Comments
 (0)