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

Allow users to upload a raw file as the request body #2700

Open
1 task done
zachary-berdell-elliott opened this issue Jul 25, 2024 · 5 comments · May be fixed by #3734
Open
1 task done

Allow users to upload a raw file as the request body #2700

zachary-berdell-elliott opened this issue Jul 25, 2024 · 5 comments · May be fixed by #3734

Comments

@zachary-berdell-elliott
Copy link
Contributor

I have checked the following:

  • I've searched existing issues and found nothing related to my issue.

Describe the feature you want to add

Hi, I recently moved from Postman to Bruno and noticed one of the features that was missing is the ability to upload a file as the request body. Having an ability for the user to select raw file as the body then a button that allows the user to pick a file to use would be helpful. I am currently using the fs and path npm packages in the script tab to fullfill this use case but think this feature would make Bruno easier to use. Thanks.

I checked to see if this Issue is already open and didn't find anything but please close if this is already open.

Mockups or Images of the feature

Screenshot 2024-07-24 220624
Screenshot 2024-07-24 220851

Please find these images to support the feature.

@zachary-berdell-elliott zachary-berdell-elliott added the enhancement New feature or request label Jul 25, 2024
@EverStarck
Copy link

please

@zachary-berdell-elliott
Copy link
Contributor Author

I don't mind working on this if needed. May take me a minute since I have mostly been working with Java recently. I've started looking over the code to understand the syntax that is being used and am finding the places I would need to implement the feature.

If someone else knows this repository better though and has the bandwidth then I'll let them pick it up.

@zachary-berdell-elliott
Copy link
Contributor Author

I've started the implementation. I'll raise a PR if I finish or I'll let someone continue this if someone else picks it up:

main...zachary-berdell-elliott:bruno:feature/add-raw-file-request-body-option

@zachary-berdell-elliott
Copy link
Contributor Author

zachary-berdell-elliott commented Aug 4, 2024

Update on development: I have got the feature working. I set up the Google Drive API in GCP to test and I am able to upload documents. I checked in google drive for a docx and it still contains all the text and formatting from when I uploaded it. I'm thinking I'll center and enlarge the button for selecting a file then raise a pr.

Screenshot 2024-08-04 134706
Screenshot 2024-08-04 134812
Screenshot 2024-08-04 134844
Screenshot 2024-08-04 134901

Functionality that hasn't been added yet:

  • Ability to convert raw files in other collection types like Insomnia and PostMan to raw file request body in Bruno. It will still convert over as no body.
  • User still needs to manually enter the content type of the file and it isn't set automatically

These features can be added in the future unless suggested otherwise during PR review. I want to keep the PR small and easy to review.

@zachary-berdell-elliott
Copy link
Contributor Author

PR open here #2755

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

Successfully merging a pull request may close this issue.

4 participants