bruno: Sending files using a multipart/form-data request fails (since 1.37.0)
I have checked the following:
- I use the newest version of bruno.
- I’ve searched existing issues and found nothing related to my issue.
Describe the bug
I’ve a collection that uploads some Json files to some service, which was working flawlessly with 1.36.x but doesn’t in 1.37.0.
Bruno’s error message is this:
Error invoking remote method 'send-http-request': TypeError: data should be a string, Buffer or Uint8Array
Adding a content-type ( @contentType(application/json) ) does not change the behavior.
.bru file to reproduce the bug
meta { name: Some Name type: http seq: 1 }
post { url: https://some.target.url/api/receive body: multipartForm auth: inherit }
headers { Content-Type: multipart/form-data }
body:multipart-form { id: 65e62dabcd3c585015b9f56f data: @file(C:\Temp\bruno_upload\some_file.json) }
Screenshots/Live demo link
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 7
- Comments: 24 (2 by maintainers)
Merged #3795 with the fixes. This is set to go out in v1.39.0 scheduled to go out on 5 Feb 2025
Hey everyone!
We’ve fixed this issue in our latest nightly build. Feel free to check it out and let us know if it works for you!
Same issue here on 1.38.0, downgraded to 1.36.1 manually and it worked straightaway
I just ran into this and found this issue. To work around the issue I just changed the header name from
Content-Typetocontent-type(lowercase). It appears the fix deals with this casing issue so give this a shot if you don’t want to downgrade.@brycethornton Thank you! That worked for me too. Can’t update yet to latest … I am on 1.38.1.
@PAllisonVSO Turning that off in 1.36.1 did not do what it is intended for. I believe that flag/checkbox started working in 1.37.0.
I falsely assumed that this was the background of your question. Sorry.
Hey, I already see a difference: I run Bruno in Developer Mode, since I need access to the filesystem. And I actually wonder how you can add a file from the filesystem while being in Safe (Sandbox) Mode. Anyway, here’s a Video:
https://github.com/user-attachments/assets/6fe8123f-d8ef-4253-b41b-aba8079ab795