I have checked the following:
This bug is:
Bruno version
2.2.0
Operating System
All systems
Describe the bug
When using the @file() syntax in a multipart-form request body, if no file is selected or attached bruno throws error EISDIR: illegal operation on a directory, read
Ideally bruno should skip multipart fields with @file() if no file is selected.
Or show a user-friendly validation error before sending the request.
.bru file to reproduce the bug
meta {
name: Test
type: http
seq: 7
}
post {
url: https://bruno.requestcatcher.com/
body: multipartForm
auth: inherit
}
body:multipart-form {
variable: value
style: test
image: @file(/Users/anusreesubash/Desktop/Screenshot 2025-04-24 at 12.39.38.png)
test: @file()
}
Screenshots/Live demo link
