-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File path handling in search query input on /temp route Fixes (#62) #94
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have only committed the DraftOrcaDashboard file. Good completion of the issue but can make sure that two of the lines are also compatible with windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkalal6 - Great work! As discussed, I updated the /upload API response to provide file_name and file_path. Here’s the updated sample response:
{
"message": "Success",
"file_name": "Styrene-H.txt",
"file_path": "/Users/.../esp/server/instance/uploads/Styrene-H.txt"
}
Added the inline comments wherever it is necessary to update the code. Please review and update accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm;
This fixes the issue #73 as well |
Fixes #62
What was changed?
The changes were made in the file upload within the DraftOrcaDashboard component. Specifically, the onUpload and onSubmit functions were modified to capture and use the full file path for uploaded files rather than just the file name. Adjustments were also made to ensure that the specify_lines parameter is correctly formatted for the request payload.
Why was it changed?
This update was intended to address an issue where the system was incorrectly using only the file name instead of the full file path, causing discrepancies in file handling between routes. By ensuring the full file path is stored and used, this change aims to improve consistency and accuracy in file handling, especially in cases where the file path is essential for backend processing.
How was it changed?
onFileSelected: Modified this function to set fileName with the full file path and ensured it was compatible with windows.
onUpload: Updated onUpload to set fileName to the full path returned by the backend (response.data.filename). This change allows fileName to store the full path, which is required in the payload.
onSubmit: Updated the onSubmit function to use fileName (now containing the full file path) in the file_path field of the request payload.