Skip to content

Commit

Permalink
Merge pull request #106 from oss-slu/update-to-orca-filepath
Browse files Browse the repository at this point in the history
Fixed the filepath issue on ORCA page
  • Loading branch information
SiriChandanaGarimella authored Nov 14, 2024
2 parents c9f5780 + fcae71e commit de668fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client-app/src/components/OrcaDashboardComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "../styles/DashboardComponent.css";

const OrcaDashboardComponent = () => {
const [selectedFile, setSelectedFile] = useState(null);
const [fileName, setFileName] = useState("");
const [filePath, setFilePath] = useState("");
const [searchTerms, setSearchTerms] = useState("");
const [specifyLines, setSpecifyLines] = useState("");
const [sections, setSections] = useState("");
Expand All @@ -30,7 +30,7 @@ const OrcaDashboardComponent = () => {
.post("http://localhost:5001/upload", formData)
.then((response) => {
console.log("File uploaded successfully:", response);
setFileName(response.data.filename);
setFilePath(response.data.file_path);
})
.catch((error) => {
console.error("Error uploading file:", error);
Expand All @@ -44,7 +44,7 @@ const OrcaDashboardComponent = () => {
}

const data = {
file_path: fileName.toString(),
file_path: filePath.toString(),
search_terms: searchTerms.split(","),
sections: sections.split(","),
specify_lines: specifyLines.toString(),
Expand Down Expand Up @@ -82,7 +82,7 @@ const OrcaDashboardComponent = () => {
}

const data = {
file_path: fileName.toString(),
file_path: filePath.toString(),
search_terms: searchTerms.split(","),
sections: sections.split(","),
specify_lines: specifyLines.toString(),
Expand Down

0 comments on commit de668fa

Please sign in to comment.