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: raw binary files handling in request body #3734

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

marcosadsj
Copy link

@marcosadsj marcosadsj commented Jan 6, 2025

Description

Feature that implements the ability to add binary raw files in body request, that detects the content-type and ensures that large files will not crash or block the app.

I tried to follow the same pattern as the multipartform feature to maintain consistency in the code.

Resolves: #2700 #3718

Requirements:

  • Select multiple raw files and choose which one is enabled.
  • Auto detect content-type of files
  • Load file asynchronously only in the pre-request moment to not crash app or block main UI
  • Ability to abort request before the file is completely read
Screenshot 2025-01-06 at 00 14 21 Screenshot 2025-01-06 at 00 16 03 Screenshot 2025-01-06 at 00 21 23

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

@marcosadsj marcosadsj changed the title Feat/binary body feat: Raw binary files handling in request body Jan 6, 2025
@marcosadsj marcosadsj changed the title feat: Raw binary files handling in request body feat: raw binary files handling in request body Jan 6, 2025
@marcosadsj marcosadsj marked this pull request as ready for review January 8, 2025 01:42
@sanjaikumar-bruno
Copy link
Contributor

@marcosadsj Thanks for your contribution to Bruno; we merged your PR into https://github.com/usebruno/bruno/tree/feat/raw-file-body, and I made some refactoring. It would be really helpful if you could review the changes in this #3829.

@marcosadsj
Copy link
Author

marcosadsj commented Jan 20, 2025

Hello @sanjaikumar-bruno , it's a pleasure to contribute with this amazing tool. I will review the changes and provide a feedback as soon as possible.

@marcosadsj
Copy link
Author

@sanjaikumar-bruno I just added one comment and one request changes, but looks really good for me!

@sanjaikumar-bruno
Copy link
Contributor

Hey @marcosadsj, thanks for taking the time to review the PR, but I’m not seeing any reviews that you suggested. Did you forget to press enter? Did you get the PR to your local and tested it?

@marcosadsj
Copy link
Author

Sorry, I just forgot to submit the review 😅

@marcosadsj
Copy link
Author

@sanjaikumar-bruno Yes, I tested locally and realized that the payload was not sending, this is related to my request change.

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.

Allow users to upload a raw file as the request body
4 participants