Skip to content

Binary access to file in vscode inside WSL send 0 #52

@romain-burot-ipsos

Description

@romain-burot-ipsos

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

5.0.0 (VS Code Extension)

Operating System

Windows 11
WSL
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy

Describe the bug

When I use the command binary file to upload a file to Google Cloud Storage, the file stay to 0 content Length but there is no error in the upload.
It seems the file is not read and a empty content is sent to the endpoint.

Image Image

I tried the same yaml in a bruno for windows (v3.3.0) I

Image but the content is present (not 0) Image

tree:
.
├── opencollection.yml
├── tpl
│   ├── Upload Video to GCS.yml
│   └── folder.yml
└── video.mp4

Image

there is 644 on the video.mp4 so the file is readable by everybody on computer and content is not null.

and not sure there is a link but when I try in the interface to find the file
Image
only folder are showed.
Image
but if write the right path to the file, the field is fulfilled and content type is automatically filled too.

Image

.yml file to reproduce the bug

info:
  name: Upload Video to GCS
  type: http
  seq: 2

http:
  method: PUT
  url: https://storage.googleapis.com/*redacted*?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=*redacted*&X-Goog-Date=*redacted*&X-Goog-Expires=*redacted*&X-Goog-SignedHeaders=*redacted*&X-Goog-Signature=*redacted*
  headers:
    - name: Content-Type
      value: video/mp4
  params:
    - name: X-Goog-Algorithm
      value: GOOG4-RSA-SHA256
      type: query
    - name: X-Goog-Credential
      value: *redacted*
      type: query
    - name: X-Goog-Date
      value: *redacted*
      type: query
    - name: X-Goog-Expires
      value: "*redacted*"
      type: query
    - name: X-Goog-SignedHeaders
      value: *redacted*
      type: query
    - name: X-Goog-Signature
      value: *redacted*
      type: query
  body:
    type: file
    data:
      - filePath: video.mp4
        contentType: video/mp4
        selected: true

runtime:
  scripts:
    - type: tests
      code: |-
        test("video uploaded successfully", function () {
          // GCS returns commonly 200 (OK) on PUT
          expect([200, 201]).to.include(res.getStatus());
        });

settings:
  encodeUrl: false
  timeout: 0
  followRedirects: true
  maxRedirects: 5

Screenshots/Live demo link

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions