Skip to content

Commit 59b5097

Browse files
committed
get organization name from file name
1 parent 07080e0 commit 59b5097

File tree

1 file changed

+2
-1
lines changed
  • components/pages/submission/Environmental/NewSubmissions

1 file changed

+2
-1
lines changed

components/pages/submission/Environmental/NewSubmissions/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ const NewSubmissions = (): ReactElement => {
5858
oneOrMoreCsv.forEach((csvFile) => {
5959
// TODO: Fine grained permissions. Check if user has permission to upload Environmental data to this organization
6060
// Taking the organization name from the filename
61-
formData.append('organization', csvFile.name);
61+
const organizationName = csvFile.name.split('.')[0];
62+
formData.append('organization', organizationName);
6263
// Submission service expects a file with the name of the schema it represents
6364
formData.append('files', csvFile, 'sample.csv');
6465
});

0 commit comments

Comments
 (0)