[GH-ISSUE #1679] Upload files in request #529

Closed
opened 2026-03-16 15:52:15 +03:00 by kerem · 2 comments
Owner

Originally created by @sawa-ko on GitHub (May 29, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1679

Is your feature request related to a problem? Please describe.
Solve the problem of making requests that require a file to be uploaded

Describe the solution you'd like
Enable file upload in the body of the POST request.

Describe alternatives you've considered
None.

Additional context
This is something that should be there since many api developers have endpoints where it is necessary to upload a file or several files in the request.

I have seen that this problem is since 2019 and they have not implemented it yet.

Originally created by @sawa-ko on GitHub (May 29, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1679 **Is your feature request related to a problem? Please describe.** Solve the problem of making requests that require a file to be uploaded **Describe the solution you'd like** Enable file upload in the body of the POST request. **Describe alternatives you've considered** None. **Additional context** This is something that should be there since many api developers have endpoints where it is necessary to upload a file or several files in the request. I have seen that this problem is since 2019 and they have not implemented it yet.
kerem closed this issue 2026-03-16 15:52:20 +03:00
Author
Owner

@liyasthomas commented on GitHub (May 29, 2021):

This feature has been implemented.

  1. Select POST method.
  2. Choose Content Type as multipart/form-data from request section.
  3. An "Attatch file icon" (📎) will appear near to Body Parameter's value field. Click on it to add files to request formData.
  4. Click "Send".
<!-- gh-comment-id:850868059 --> @liyasthomas commented on GitHub (May 29, 2021): This feature has been implemented. 1. Select `POST` method. 2. Choose `Content Type` as `multipart/form-data` from request section. 3. An "Attatch file icon" (📎) will appear near to Body Parameter's value field. Click on it to add files to request formData. 4. Click "Send".
Author
Owner

@Rafay106 commented on GitHub (Dec 23, 2023):

How do I send text fields with an image field using multipart/form-data

  • I am using multer in express js
  • This is the request I am making using Hoppscotch
    image
  • The image field is optional, if I don't send it I am getting "Unexpected end of form" error, this is not the case in Postman, if I uncheck image field then it is not giving any errors in postman
  • Also I am sending some text fields in the above request, which is not reaching backend, the req.body object is empty
  • This is not the case in postman, I am receiving all text fields in req.body
    image

So overall I have 2 issues

  1. Getting "Unexpected end of form" error when not sending file field
  2. Can not send text fields together with field field in multipart/form-data
<!-- gh-comment-id:1868274883 --> @Rafay106 commented on GitHub (Dec 23, 2023): ## How do I send text fields with an image field using multipart/form-data - I am using multer in express js - This is the request I am making using Hoppscotch ![image](https://github.com/hoppscotch/hoppscotch/assets/62567028/73f0172c-b32f-4741-a799-0ef6e02fcd3e) - The image field is optional, if I don't send it I am getting "Unexpected end of form" error, this is not the case in Postman, if I uncheck image field then it is not giving any errors in postman - Also I am sending some text fields in the above request, which is not reaching backend, the req.body object is empty - This is not the case in postman, I am receiving all text fields in req.body ![image](https://github.com/hoppscotch/hoppscotch/assets/62567028/eff7cb96-2e0d-47c1-bd61-4db40b94fd7a) ### So overall I have 2 issues 1. Getting "Unexpected end of form" error when not sending file field 2. Can not send text fields together with field field in multipart/form-data
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#529
No description provided.