Skip to content

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

@anusree-bruno

Description

@anusree-bruno

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.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions