[GH-ISSUE #4869] [bug]: Can't send multipart/form data #1833

Closed
opened 2026-03-16 21:59:40 +03:00 by kerem · 11 comments
Owner

Originally created by @CheloXL on GitHub (Mar 10, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4869

Originally assigned to: @CuriousCorrelation on GitHub.

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Current behavior

I'm trying to do a simple file(s) upload. It always fails with "Extension error. Failed running request on extension"

Steps to reproduce

Image

Logs and Screenshots

Browser console shows:

Image

Image

Image

Originally created by @CheloXL on GitHub (Mar 10, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4869 Originally assigned to: @CuriousCorrelation on GitHub. ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Current behavior I'm trying to do a simple file(s) upload. It always fails with "Extension error. Failed running request on extension" ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/78b23a89-813b-4095-b080-09b696b1a98e) ### Logs and Screenshots Browser console shows: ![Image](https://github.com/user-attachments/assets/c5734682-1d76-4856-b255-9114521986c2) ![Image](https://github.com/user-attachments/assets/d19fb753-8404-4104-a8e7-c9a6ad49cae0) ![Image](https://github.com/user-attachments/assets/94574d1c-db3a-48ce-9e9b-796393930f17)
kerem 2026-03-16 21:59:40 +03:00
Author
Owner

@jamesgeorge007 commented on GitHub (Mar 11, 2025):

Hi, we have a PR with the fix scheduled for the next patch release.

<!-- gh-comment-id:2713640119 --> @jamesgeorge007 commented on GitHub (Mar 11, 2025): Hi, we have a [PR](https://github.com/hoppscotch/hoppscotch/pull/4860) with the fix scheduled for the next patch release.
Author
Owner

@liyasthomas commented on GitHub (Mar 14, 2025):

We've released a patch to fix this. @CheloXL can you check if it's resolved at your end.

<!-- gh-comment-id:2723796633 --> @liyasthomas commented on GitHub (Mar 14, 2025): We've released a patch to fix this. @CheloXL can you check if it's resolved at your end.
Author
Owner

@CheloXL commented on GitHub (Mar 14, 2025):

Mmm... No. And now the error message is terser. Running version 2025.2.2 with extension 0.37.

Image

<!-- gh-comment-id:2724719184 --> @CheloXL commented on GitHub (Mar 14, 2025): Mmm... No. And now the error message is terser. Running version 2025.2.2 with extension 0.37. ![Image](https://github.com/user-attachments/assets/a23548ee-7510-4cb1-9bab-5ce59f327ffb)
Author
Owner

@CuriousCorrelation commented on GitHub (Mar 20, 2025):

Hi @CheloXL, having some trouble reproducing this issue, so to help diagnose what's happening, could you please try sending a request to an echo server? This will help us see exactly what the server is receiving.

Please feel free to use the same multipart/form-data setup, you can just paste the following in the endpoint/URL input to auto-insert the full request:

curl --request POST \
  --url 'https://echo.qubit.codes/?qp=1' \
  --header 'content-type: multipart/form-data' \
  --form test_file=@test_file

Simply change test_file to any test file you have available after pasting the request from the app's UI.

This will help us determine if the issue is with Hoppscotch's request handling, the extension, or potentially something in between.

<!-- gh-comment-id:2740272509 --> @CuriousCorrelation commented on GitHub (Mar 20, 2025): Hi @CheloXL, having some trouble reproducing this issue, so to help diagnose what's happening, could you please try sending a request to an echo server? This will help us see exactly what the server is receiving. Please feel free to use the same `multipart/form-data` setup, you can just paste the following in the endpoint/URL input to auto-insert the full request: ``` curl --request POST \ --url 'https://echo.qubit.codes/?qp=1' \ --header 'content-type: multipart/form-data' \ --form test_file=@test_file ``` Simply change `test_file` to any test file you have available after pasting the request from the app's UI. This will help us determine if the issue is with Hoppscotch's request handling, the extension, or potentially something in between.
Author
Owner

@CheloXL commented on GitHub (Mar 20, 2025):

Done. The first thing I see is that while I selected two files (and assigned the same name) only one is listed in the response.

Image

{
  "method": "POST",
  "url": "https://echo.qubit.codes/",
  "full_url": "https://echo.qubit.codes/?qp=1",
  "path": "/",
  "segments": [],
  "query_params": {
    "qp": "1"
  },
  "post_params": [],
  "all_params": {
    "qp": "1"
  },
  "files": {
    "test_file": {
      "name": "a.tsx",
      "size": 6018,
      "mime_type": "text/plain",
      "path": "/home/qubitcodes/tmp/phpl7uMfK",
      "extension": "tsx",
      "error": 0
    }
  },
  "headers": {
    "Priority": "u=1, i",
    "Accept-Language": "en-US,en;q=0.9,es-AR;q=0.8,es;q=0.7,es-ES;q=0.6",
    "Accept-Encoding": "gzip, deflate, br, zstd",
    "Sec-Fetch-Storage-Access": "active",
    "Sec-Fetch-Dest": "empty",
    "Sec-Fetch-Mode": "cors",
    "Sec-Fetch-Site": "none",
    "Origin": "chrome-extension://amknoiejhlmhancpahfcfcfhllgkpbld",
    "Accept": "*/*",
    "Content-Type": "multipart/form-data; boundary=----WebKitFormBoundaryZFqWbw24k8Bx4zNU",
    "Dnt": "1",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0",
    "Content-Length": "12360",
    "Connection": "close",
    "X-Forwarded-For": "186.158.145.65",
    "Host": "echo.qubit.codes"
  },
  "cookies": [],
  "ip": "186.158.145.65",
  "time": "2025-03-20T18:03:22+00:00",
  "is_secure": true,
  "ajax": false,
  "is_json": false,
  "decoded_content": ""
}
<!-- gh-comment-id:2741280023 --> @CheloXL commented on GitHub (Mar 20, 2025): Done. The first thing I see is that while I selected two files (and assigned the same name) only one is listed in the response. ![Image](https://github.com/user-attachments/assets/abe1a206-ab87-4e3f-a937-25d3db5c1d6d) ``` { "method": "POST", "url": "https://echo.qubit.codes/", "full_url": "https://echo.qubit.codes/?qp=1", "path": "/", "segments": [], "query_params": { "qp": "1" }, "post_params": [], "all_params": { "qp": "1" }, "files": { "test_file": { "name": "a.tsx", "size": 6018, "mime_type": "text/plain", "path": "/home/qubitcodes/tmp/phpl7uMfK", "extension": "tsx", "error": 0 } }, "headers": { "Priority": "u=1, i", "Accept-Language": "en-US,en;q=0.9,es-AR;q=0.8,es;q=0.7,es-ES;q=0.6", "Accept-Encoding": "gzip, deflate, br, zstd", "Sec-Fetch-Storage-Access": "active", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "none", "Origin": "chrome-extension://amknoiejhlmhancpahfcfcfhllgkpbld", "Accept": "*/*", "Content-Type": "multipart/form-data; boundary=----WebKitFormBoundaryZFqWbw24k8Bx4zNU", "Dnt": "1", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0", "Content-Length": "12360", "Connection": "close", "X-Forwarded-For": "186.158.145.65", "Host": "echo.qubit.codes" }, "cookies": [], "ip": "186.158.145.65", "time": "2025-03-20T18:03:22+00:00", "is_secure": true, "ajax": false, "is_json": false, "decoded_content": "" } ```
Author
Owner

@CuriousCorrelation commented on GitHub (Mar 21, 2025):

Hi @CheloXL,

Thanks for running that test! It seems like extension is correctly sending multipart/formdata after the latest update and the server is indeed receiving it as well.

Looking at the echo server response, I believe this behavior varies from server to server depending on how they handle multipart form data with duplicate field names.

I ran similar tests with curl directly and found that both the echo.qubit.codes and httpbin.org servers show the same behavior - when sending two files with the same field name ("test_file"), only one file appears in the response.

curl --location 'https://httpbin.org/post' \
--form 'test_file=@"test.txt"' \
--form 'test_file=@"test.txt"'

Response:

{
  "args": {},
  "data": "",
  "files": {
    "test_file": "a test file\n"
  },
  "form": {},
  "headers": {
    "Accept": "*/*",
    "Content-Length": "378",
    "Content-Type": "multipart/form-data; boundary=------------------------gfZIeSM9JzyP9OTbD94Z3v",
    "Host": "httpbin.org",
    "User-Agent": "curl/8.12.0",
    "X-Amzn-Trace-Id": "Root=1-67dd273c-74ddfae12700cb372a1c19d5"
  },
  "json": null,
  "origin": "182.65.147.240",
  "url": "https://httpbin.org/post"
}

As you can see, this matches your experience - only one file appears in the response despite sending two with the same field name.

To determine if this is specific to Hoppscotch or simply how your target server processes the request, you might want to compare the same request using other tools like curl or any other API testing tools for verification.

<!-- gh-comment-id:2742744626 --> @CuriousCorrelation commented on GitHub (Mar 21, 2025): Hi @CheloXL, Thanks for running that test! It seems like extension is correctly sending `multipart/formdata` after the latest update and the server is indeed receiving it as well. Looking at the echo server response, I believe this behavior varies from server to server depending on how they handle multipart form data with duplicate field names. I ran similar tests with curl directly and found that both the `echo.qubit.codes` and `httpbin.org` servers show the same behavior - when sending two files with the same field name ("test_file"), only one file appears in the response. ```bash curl --location 'https://httpbin.org/post' \ --form 'test_file=@"test.txt"' \ --form 'test_file=@"test.txt"' ``` Response: ```json { "args": {}, "data": "", "files": { "test_file": "a test file\n" }, "form": {}, "headers": { "Accept": "*/*", "Content-Length": "378", "Content-Type": "multipart/form-data; boundary=------------------------gfZIeSM9JzyP9OTbD94Z3v", "Host": "httpbin.org", "User-Agent": "curl/8.12.0", "X-Amzn-Trace-Id": "Root=1-67dd273c-74ddfae12700cb372a1c19d5" }, "json": null, "origin": "182.65.147.240", "url": "https://httpbin.org/post" } ``` As you can see, this matches your experience - only one file appears in the response despite sending two with the same field name. To determine if this is specific to Hoppscotch or simply how your target server processes the request, you might want to compare the same request using other tools like curl or any other API testing tools for verification.
Author
Owner

@CuriousCorrelation commented on GitHub (Apr 11, 2025):

Noticed there hasn't been activity on this issue for a while, and although we've made improvements to the extension, it does have inherent limitations that can't be easily overcome.

For a much better experience with file uploads and other API testing needs, I strongly recommend our Hoppscotch Desktop App, which offers more reliable functionality, more features, better diagnostics, and overall stability.

I'll be closing this issue now, but feel free to reach out if you have any questions!

<!-- gh-comment-id:2796402364 --> @CuriousCorrelation commented on GitHub (Apr 11, 2025): Noticed there hasn't been activity on this issue for a while, and although we've made improvements to the extension, it does have inherent limitations that can't be easily overcome. For a much better experience with file uploads and other API testing needs, I strongly recommend our [Hoppscotch Desktop App](https://hoppscotch.com/download), which offers more reliable functionality, more features, better diagnostics, and overall stability. I'll be closing this issue now, but feel free to reach out if you have any questions!
Author
Owner

@CheloXL commented on GitHub (Apr 11, 2025):

I didn't have time to re-check, but please note that this was working. I never used the desktop app.

<!-- gh-comment-id:2796808523 --> @CheloXL commented on GitHub (Apr 11, 2025): I didn't have time to re-check, but please note that this was working. I never used the desktop app.
Author
Owner

@CheloXL commented on GitHub (Apr 11, 2025):

Just tested. Still not working.

Image

<!-- gh-comment-id:2796819348 --> @CheloXL commented on GitHub (Apr 11, 2025): Just tested. Still not working. ![Image](https://github.com/user-attachments/assets/6517abc0-63db-4855-8a74-54319c27d0fc)
Author
Owner

@CuriousCorrelation commented on GitHub (Apr 11, 2025):

Hi @CheloXL thanks for making time to follow up.

What makes this particularly difficult is that we haven't been able to reproduce the issue consistently on our end. Different environments and configurations seem to affect this behavior.

The extension has become increasingly challenging to maintain with our evolving architecture. As we've moved core functionality into our cross-platform kernel, enabling significant improvements across our ecosystem, the browser extension, due to its nature, has become somewhat detached from these improvements.

While we'll definitely continue investigating this specific issue, I highly recommend trying our Desktop app. It offers significantly better file upload handling, all CORS-bypassing capabilities of the extension, reliable localhost connections, and can receive better support thanks to its diagnostic capabilities for functionality like these.

<!-- gh-comment-id:2796884603 --> @CuriousCorrelation commented on GitHub (Apr 11, 2025): Hi @CheloXL thanks for making time to follow up. What makes this particularly difficult is that we haven't been able to reproduce the issue consistently on our end. Different environments and configurations seem to affect this behavior. The extension has become increasingly challenging to maintain with our evolving architecture. As we've moved core functionality into our cross-platform kernel, enabling significant improvements across our ecosystem, the browser extension, due to its nature, has become somewhat detached from these improvements. While we'll definitely continue investigating this specific issue, I highly recommend trying our [Desktop app](https://hoppscotch.com/download). It offers significantly better file upload handling, all CORS-bypassing capabilities of the extension, reliable localhost connections, and can receive better support thanks to its diagnostic capabilities for functionality like these.
Author
Owner

@3v3r-aidev commented on GitHub (Oct 3, 2025):

same problem on my end. sending a csv file to an n8n webhook url and it keeps arriving as json and not as binary (csv)

<!-- gh-comment-id:3364997962 --> @3v3r-aidev commented on GitHub (Oct 3, 2025): same problem on my end. sending a csv file to an n8n webhook url and it keeps arriving as json and not as binary (csv)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1833
No description provided.