Skip to content

Commit

Permalink
Support the 3 variant mime types for zip files
Browse files Browse the repository at this point in the history
-- fixes 'project import' in contexts where the environment chooses one of the 2 varients we didn't previously support.
  • Loading branch information
judeallred committed Jan 9, 2024
1 parent efe1801 commit 3fc9c7c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/sim-core/packages/core/src/features/files/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ export const useImportFiles = () => {
}
const file = files[0];

if (file.type !== "application/zip") {
const zipMimeTypes = [
"application/zip",
"application/zip-compressed",
"application/x-zip-compressed",
];
if (!zipMimeTypes.includes(file.type)) {
throw "Please upload a .zip file";
}

Expand Down

0 comments on commit 3fc9c7c

Please sign in to comment.