Skip to content

Commit

Permalink
Send original extension for non-pdf docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Apr 11, 2024
1 parent d896cba commit 6483d04
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/components/forms/DocumentUpload.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
// put things together
const docs: DocumentUpload[] = titles.map((title, i) => {
const [name, ...ext] = filenames[i].split("."); // don't assume there's only one extension
return {
title,
access,
language,
projects: projects.map((p: Project) => p.id),
revision_control,
original_extension: ext[ext.length - 1],
};
});
Expand Down

0 comments on commit 6483d04

Please sign in to comment.