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

feat(model): add support to upload files #143

Merged
merged 27 commits into from
Nov 10, 2020
Merged

feat(model): add support to upload files #143

merged 27 commits into from
Nov 10, 2020

Conversation

JoaoPedroAS51
Copy link
Collaborator

@JoaoPedroAS51 JoaoPedroAS51 commented Nov 6, 2020

Add support to upload files by checking if data has instance of File. If so, it set the Content-Type to multipart/form-data and convert the data object to FormData using object-to-formdata.

Require #142

Based on comment by @alvaro-canepa at #83

Closes #83

TODO

  • Update documentation
  • Update tests
  • Add dependency object-to-formdata

@JoaoPedroAS51 JoaoPedroAS51 marked this pull request as draft November 6, 2020 01:43
@robsontenorio
Copy link
Owner

Beautiful!

I know there are some gotchas behind FormData, I can’t remember right know. But, it is a optional feature and there are no breaking changes, looks good for me. Let’s try it.

Please, wait reviews from #142

@JoaoPedroAS51 JoaoPedroAS51 marked this pull request as ready for review November 9, 2020 21:12
@JoaoPedroAS51 JoaoPedroAS51 merged commit a93cf5e into dev Nov 10, 2020
@JoaoPedroAS51 JoaoPedroAS51 deleted the feat/files branch November 10, 2020 01:09
@Peter-Krebs
Copy link
Collaborator

Thanks for taking the time to implement @JoaoPedroAS51 that was a long awaited feature 🚀

@github-actions
Copy link

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upload a PDF file
3 participants