[GH-ISSUE #2453] [bug]: Can't save a request with multipart/form-data body #829

Closed
opened 2026-03-16 17:21:03 +03:00 by kerem · 7 comments
Owner

Originally created by @ngocthua830 on GitHub (Jun 23, 2022).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2453

Originally assigned to: @anwarulislam on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I save a request with body have binary file I got error:
Uncaught (in promise) FirebaseError: Function setDoc() called with invalid data. Unsupported field value: a custom File object (found in document users/lgddOcyz50hVaH7MjbOq1MgXOvH3/collections/sync)

After reload page and select the request, it's body had been clean.

Steps to reproduce

  1. Create a request
  2. Change body to multipart/form-data
  3. Add a binary file to parameter
  4. Click save button
  5. Got error in browser console
  6. Reload page
  7. Select the request had been saved
  8. Body disappeared

Environment

Deploy preview

Version

Cloud

Originally created by @ngocthua830 on GitHub (Jun 23, 2022). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2453 Originally assigned to: @anwarulislam on GitHub. ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior When I save a request with body have binary file I got error: Uncaught (in promise) FirebaseError: Function setDoc() called with invalid data. Unsupported field value: a custom File object (found in document users/lgddOcyz50hVaH7MjbOq1MgXOvH3/collections/sync) After reload page and select the request, it's body had been clean. ### Steps to reproduce 1. Create a request 2. Change body to multipart/form-data 3. Add a binary file to parameter 4. Click save button 5. Got error in browser console 6. Reload page 7. Select the request had been saved 8. Body disappeared ### Environment Deploy preview ### Version Cloud
kerem 2026-03-16 17:21:03 +03:00
Author
Owner

@ngocthua830 commented on GitHub (Jul 4, 2022):

I added error screen
image

<!-- gh-comment-id:1173284872 --> @ngocthua830 commented on GitHub (Jul 4, 2022): I added error screen ![image](https://user-images.githubusercontent.com/21144351/177073900-7abf911a-66ed-4036-8bdc-be0a3710c90f.png)
Author
Owner

@anwarulislam commented on GitHub (Aug 2, 2022):

Thanks for raising the issue. But, unfortunately, there is a technical limitation in remembering the file we've chosen as it is a web application. We can't implement the feature as of now.

<!-- gh-comment-id:1202491067 --> @anwarulislam commented on GitHub (Aug 2, 2022): Thanks for raising the issue. But, unfortunately, there is a technical limitation in remembering the file we've chosen as it is a web application. We can't implement the feature as of now.
Author
Owner

@KartikSoneji commented on GitHub (Oct 12, 2022):

Is there a reason the file can't be stored as a base64 data-uri?

<!-- gh-comment-id:1276698095 --> @KartikSoneji commented on GitHub (Oct 12, 2022): Is there a reason the file can't be stored as a base64 data-uri?
Author
Owner

@AshotN commented on GitHub (Mar 1, 2023):

@anwarulislam Can it be fixed so that the entire body is not deleted? Not saving the file is reasonable

<!-- gh-comment-id:1450822857 --> @AshotN commented on GitHub (Mar 1, 2023): @anwarulislam Can it be fixed so that the entire body is not deleted? Not saving the file is reasonable
Author
Owner

@ngocthua830 commented on GitHub (Feb 17, 2025):

@anwarulislam I think it’s necessary to save at least the parameter names with empty values. Many people, including myself, get annoyed when the entire body is deleted.

<!-- gh-comment-id:2663826767 --> @ngocthua830 commented on GitHub (Feb 17, 2025): @anwarulislam I think it’s necessary to save at least the parameter names with empty values. Many people, including myself, get annoyed when the entire body is deleted.
Author
Owner

@anwarulislam commented on GitHub (Feb 17, 2025):

Hi @ngocthua830, @KartikSoneji, @AshotN!
I submitted a pull request to fix this issue. The problem will be resolved after the next release!

<!-- gh-comment-id:2664232837 --> @anwarulislam commented on GitHub (Feb 17, 2025): Hi @ngocthua830, @KartikSoneji, @AshotN! I submitted a pull request to fix this issue. The problem will be resolved after the next release!
Author
Owner

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

Hi, the proposed fix is live with the v2025.2.0 release. Please feel free to let us know if you have any feedback.

<!-- gh-comment-id:2705727079 --> @jamesgeorge007 commented on GitHub (Mar 7, 2025): Hi, the proposed fix is live with the [v2025.2.0 release](https://github.com/hoppscotch/hoppscotch/releases/tag/2025.2.0). Please feel free to let us know if you have any feedback.
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#829
No description provided.