bruno icon indicating copy to clipboard operation
bruno copied to clipboard

@file() in multipart requests without a file causes EISDIR crash — should be ignored or handled gracefully

Open anusree-bruno opened this issue 8 months ago • 0 comments

I have checked the following:

  • [x] 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
  • [x] annoying
  • [ ] this feature was working in a previous version but is broken in the current release.

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

Image

anusree-bruno avatar Apr 24 '25 07:04 anusree-bruno