Skip to content

Request disappearing from the UI with specific multipart values #5767

@szdariusz

Description

@szdariusz

I have checked the following:

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

This bug is:

  • making Bruno unusable for me
  • slowing me down but I'm able to continue working
  • annoying
  • this feature was working in a previous version but is broken in the current release.

Bruno version

2.12.0

Jira

Operating System

macOS 26.0.1

Describe the bug

Hi!

I found a problem related to some multipart related requests which Bruno can’t reopen in my collection if I close it then open it again.

I have a Java Spring Boot application with some POST endpoints that require multipart files but also require a JSON attribute in the same request body as based on the given JSON attribute the files can processed in different ways.

In the Bruno client, by the request I select ‘Multipart Form’ for the Body and then I add the ‘inputfiles’ and ‘requestBody’ as form-data parameters. But for the request to work with my application’s endpoint, I need to also specify ‘application/json’ under the Content-Type column for the ‘requestBody’ param as that’s a JSON, as without this my endpoint will return with 415 MediaType not supported status (image1_error and image2_success).

Now if I close the request collection, then open it again from the same directory, all the requests that are similar in structure (so multipart files + JSON body in same request) are ignored and won’t come up in my Bruno client anymore - this is very strange as when I created them, they were there and were usable by Bruno.

  • If I export the request as a curl, it shows up like this (even when the additional ‘application/json’ is specified in the Bruno client):
curl --request POST \
 --url https://myserviceurl/convert \
 --header 'authorization: Bearer token’ \
 --header 'content-type: multipart/form-data' \
 --header ‘teamnumber: 111’ \
 --form inputFiles=@/Users/Me/myFile \
 --form 'requestBody={
   "conversionMethod": "DOCX_TO_PDF",
   "replacements": "[VENNAME]=Coca Cola;[IDNO]=5225626252"
}'

I’ve checked the same in Postman, and there ‘;type=application/json' is added at the end of the requestBody this way:

--form 'requestBody="{
    \"conversionMethod\": \"DOCX_TO_PDF\”,
\"replacements\": \"[VENNAME]=Coca Cola;[IDNO]=5225626252"
}\";type=application/json'
  • If I open the Bruno request file via Sublime or other text editors, it seems like Bruno saves it like this (with the ‘@ContentType(application/json)’ there):
meta {
  name: Convert values in file
  type: http
  seq: 6
}
 
post {
  url: https://myserviceurl/convert
  body: multipartForm
  auth: bearer
}
 
headers {
  teamnumber: 111
}
 
auth:bearer {
  token: token
}
 
body:multipart-form {
  inputFiles: @file(/Users/Me/myFile)
  requestBody: '''
    {
        "conversionMethod": "DOCX_TO_PDF",
        "replacements": "[VENNAME]=Coca Cola;[IDNO]=5225626252"
    }
  ''' @contentType(application/json)
}
  • If I remove the ‘@ContentType(application/json)’ from the end, the request will come up fine in Bruno as it recognizes it (this is the content-type I had to add separately for my request under the Body tab for the requestBody attribute as can be seen on image2_success).

My expectation would be that if I save a request in Bruno like this and close, then open the collection containing it, the requests should also come up fine, but at the moment unfortunately they don’t.

Could you please help?
Thanks!

.bru file to reproduce the bug

No response

Screenshots/Live demo link

Image Image

Metadata

Metadata

Labels

P1bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions