Skip to content

Conversation

@pvdosev
Copy link
Contributor

@pvdosev pvdosev commented Sep 25, 2024

Closes #60

The check
if request.content_type == "multipart/form-data" else request.get_json()
doesn't work, because the content type in a multipart form data request also includes the separator between the data of the form, like "multipart/form-data; boundary=------------------------vqfqxmgyrMqVTDpDiq7JrB". This changes every request.

Of course, we could parse it with some string separation, which would be pretty simple, but I thought I'd remove the json part completely since we aren't going to be accepting json data there anyway. I can re-add it if we think it's necessary, but I'd say it's easier and more straightforward like this.

This pull request, if applied along with MLH-Fellowship/orientation-project-js-24.FAL.A#24, makes the uploading of data work correctly.

@awilkescom
Copy link
Collaborator

Thanks @pvdosev - can you review the linter and test feedback?

@pvdosev
Copy link
Contributor Author

pvdosev commented Sep 25, 2024

Agh the test uses json

@pvdosev
Copy link
Contributor Author

pvdosev commented Sep 25, 2024

Hehe love a passing test

Copy link
Member

@hastagAB hastagAB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 🚀

@pvdosev pvdosev merged commit 8e6d60e into main Sep 25, 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.

Fix adding new experiences

4 participants