Skip to content
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

fix file path not being sent to backend #47

Merged
merged 7 commits into from
Jun 17, 2024
Merged

fix file path not being sent to backend #47

merged 7 commits into from
Jun 17, 2024

Conversation

yonglintan
Copy link
Contributor

Previously, the backend was only receiving the name of the file (e.g. c.py for the file a/b/c.py). As a result, all responses received also only contained the name of the file, and it would be impossible to tell apart files with same name in different folders.
The problem seems to lie with the FormData object, which was removing all the path parts of relativePath and leaving only the name. To avoid this, relativePath should instead be provided as the filePath attribute of the FormData.AppendOptions object.

References: https://github.com/form-data/form-data?tab=readme-ov-file#alternative-submission-methods

@yonglintan yonglintan self-assigned this May 31, 2024
@yonglintan yonglintan requested review from AviGopal June 5, 2024 19:04
@yonglintan yonglintan marked this pull request as ready for review June 5, 2024 19:04
@AviGopal AviGopal merged commit 0d2fab7 into main Jun 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants