Skip to content

Generate Code error with Binary/File request #4749

@Art051

Description

@Art051

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

Operating System

macOS 15.5 (24F74)

Describe the bug

'Generate Code' functionality does not work when used with requests which are 'File/Binary' type.
The same error occurs in all 3 variations I checked:

  1. File/Binary request with a file selected and checkbox ticked.
  2. File/Binary request with a the file field empty and checkbox ticked.
  3. File/Binary request with an empty request body.

I noticed PR 4207 that somewhat resolves this bug, but not entirely as it fails to handle cases 2 and 3.

I believe I've got a working solution I will push to accompany this issue.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

File/Binary request with a file selected and checkbox ticked.

Image
Image


File/Binary request with a the file field empty and checkbox ticked.

Image
Image


File/Binary request with an empty request body.

Image
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions