Skip to content

Commit

Permalink
Merge pull request #498 from powerhouse-inc/remove-file-ext-when-impo…
Browse files Browse the repository at this point in the history
…rt-document

fix: remove file ext when importing document
  • Loading branch information
gpuente authored Aug 26, 2024
2 parents a28e9a8 + fc926ec commit 7294b6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hooks/useUiNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,13 @@ export function useUiNodes() {
if (parentNode.kind === FILE) {
throw new Error('Cannot add file to a file');
}

const fileName = file.name.replace(/\.zip$/gim, '');

return await addFile(
file,
parentNode.driveId,
file.name,
fileName,
parentNode.id,
);
},
Expand Down

0 comments on commit 7294b6e

Please sign in to comment.