[GH-ISSUE #5233] [bug]: File uploads incorrectly set MIME type as text/plain instead of actual file type #1995

Closed
opened 2026-03-16 22:47:16 +03:00 by kerem · 8 comments
Owner

Originally created by @arentalb on GitHub (Jul 9, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5233

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

Platform

Desktop App

Browser

Chrome

Operating System

Windows

Bug Description

When I do file uploads using multipart/form-data, all files get sent with text/plain MIME type happens and I see the error:

Error: Unsupported file type
at fileFilter (D:\Documents\code\work\avanasoft\slemani-water\src\upload\upload.decorator.ts:35:18)
at wrappedFileFilter (D:\Documents\code\work\avanasoft\slemani-water\node_modules\multer\index.js:44:7)
at Multipart. (D:\Documents\code\work\avanasoft\slemani-water\node_modules\multer\lib\make-middleware.js:123:7)

What I expected is that PNG files should be image/png, SVG files should be image/svg+xml, etc.

I logged the file I get in my app:
console.log(
File received: ${file.originalname}, Type: ${file.mimetype},
);

and I got "File received: image, Type: text/plain"

in postman i get this "File received: 2.png, Type: image/png"

Same exact endpoint works fine in Postman - files come through with correct MIME types and filenames.

Image Image

i saw other issue that kind same as this one but it was not solved

i checked this post and i did exactly same thing
https://www.linkedin.com/posts/hoppscotch_specify-content-types-for-request-body-form-activity-7276850384575361024-64tF?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAADMopP4BTM0fj0IsooC4TwqPdnH4ZmHpKS0

also i checked the docs
https://docs.hoppscotch.io/documentation/getting-started/rest/uploading-data

Deployment Type

Hoppscotch Cloud

Version

2025.6.0

Originally created by @arentalb on GitHub (Jul 9, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5233 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 ### Platform Desktop App ### Browser Chrome ### Operating System Windows ### Bug Description When I do file uploads using multipart/form-data, all files get sent with text/plain MIME type happens and I see the error: Error: Unsupported file type at fileFilter (D:\Documents\code\work\avanasoft\slemani-water\src\upload\upload.decorator.ts:35:18) at wrappedFileFilter (D:\Documents\code\work\avanasoft\slemani-water\node_modules\multer\index.js:44:7) at Multipart.<anonymous> (D:\Documents\code\work\avanasoft\slemani-water\node_modules\multer\lib\make-middleware.js:123:7) What I expected is that PNG files should be image/png, SVG files should be image/svg+xml, etc. I logged the file I get in my app: console.log( `File received: ${file.originalname}, Type: ${file.mimetype}`, ); and I got "File received: image, Type: text/plain" in postman i get this "File received: 2.png, Type: image/png" Same exact endpoint works fine in Postman - files come through with correct MIME types and filenames. <img width="1297" height="868" alt="Image" src="https://github.com/user-attachments/assets/fb2fa29d-6693-4e00-bc67-8f72ddc147f0" /> <img width="1411" height="863" alt="Image" src="https://github.com/user-attachments/assets/cf5eba51-3646-42f5-8eb8-6e1da66b831d" /> i saw other issue that kind same as this one but it was not solved i checked this post and i did exactly same thing https://www.linkedin.com/posts/hoppscotch_specify-content-types-for-request-body-form-activity-7276850384575361024-64tF?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAADMopP4BTM0fj0IsooC4TwqPdnH4ZmHpKS0 also i checked the docs https://docs.hoppscotch.io/documentation/getting-started/rest/uploading-data ### Deployment Type Hoppscotch Cloud ### Version 2025.6.0
kerem 2026-03-16 22:47:16 +03:00
Author
Owner

@raludi commented on GitHub (Jul 21, 2025):

Same error here, but in my case it’s a bit different. Even though I set the MIME type to image/png, our server still receives it as other.

Deployment Type

Hoppscotch Cloud

Version

2025.6.1

<!-- gh-comment-id:3096145896 --> @raludi commented on GitHub (Jul 21, 2025): Same error here, but in my case it’s a bit different. Even though I set the MIME type to image/png, our server still receives it as `other`. ### Deployment Type Hoppscotch Cloud ### Version 2025.6.1
Author
Owner

@codingPotato21 commented on GitHub (Aug 4, 2025):

Hello,

After testing currently also suffering from this same issue. MIME type received on the server is always text.

<!-- gh-comment-id:3151586401 --> @codingPotato21 commented on GitHub (Aug 4, 2025): Hello, After testing currently also suffering from this same issue. MIME type received on the server is always text.
Author
Owner

@arentalb commented on GitHub (Aug 4, 2025):

Use the PWA for now until they fix it , the web version (PWA) works fine

<!-- gh-comment-id:3151604236 --> @arentalb commented on GitHub (Aug 4, 2025): Use the PWA for now until they fix it , the web version (PWA) works fine
Author
Owner

@codingPotato21 commented on GitHub (Aug 4, 2025):

Use the PWA for now until they fix it , the web version (PWA) works fine

Alright will do, thank you

<!-- gh-comment-id:3151656986 --> @codingPotato21 commented on GitHub (Aug 4, 2025): > Use the PWA for now until they fix it , the web version (PWA) works fine Alright will do, thank you
Author
Owner

@jamesgeorge007 commented on GitHub (Aug 8, 2025):

Hi, this is addressed in the latest release. Please let us know if the issue persists.

<!-- gh-comment-id:3168716846 --> @jamesgeorge007 commented on GitHub (Aug 8, 2025): Hi, this is addressed in the latest release. Please let us know if the issue persists.
Author
Owner

@jYepesCIA commented on GitHub (Oct 22, 2025):

Hello, this was working for me a few weeks ago, now that i've reopen the project is not working for me anymore.

I've tested in two different projects today, both use Fastify api with Fastify-multipart:
https://github.com/fastify/fastify-multipart

Tested in the Hoppscotch native app (v2025.9.1 IMac M1) and in the web app (v2025.9.2 Google Chrome)

Debugger screenshot of the file field arriving at my api:
Image

Hoppscotch web app endpoint setup:
Image

Debugger screenshot of the same endpoint request but made from the frontend form to show that the code works.
Image

Thanks!

<!-- gh-comment-id:3433102162 --> @jYepesCIA commented on GitHub (Oct 22, 2025): Hello, this was working for me a few weeks ago, now that i've reopen the project is not working for me anymore. I've tested in two different projects today, both use Fastify api with Fastify-multipart: https://github.com/fastify/fastify-multipart Tested in the Hoppscotch native app (v2025.9.1 IMac M1) and in the web app (v2025.9.2 Google Chrome) Debugger screenshot of the file field arriving at my api: <img width="348" height="220" alt="Image" src="https://github.com/user-attachments/assets/27791aee-6996-4a9d-883c-6eaf6492f957" /> Hoppscotch web app endpoint setup: <img width="1316" height="659" alt="Image" src="https://github.com/user-attachments/assets/76314355-ee99-4d26-ab64-0c1081846302" /> Debugger screenshot of the same endpoint request but made from the frontend form to show that the code works. <img width="439" height="233" alt="Image" src="https://github.com/user-attachments/assets/2a0551d1-e24c-4ae3-9f6b-18642572d316" /> Thanks!
Author
Owner

@jamesgeorge007 commented on GitHub (Nov 3, 2025):

Hello, this was working for me a few weeks ago, now that i've reopen the project is not working for me anymore.

I've tested in two different projects today, both use Fastify api with Fastify-multipart: https://github.com/fastify/fastify-multipart

Tested in the Hoppscotch native app (v2025.9.1 IMac M1) and in the web app (v2025.9.2 Google Chrome)

Debugger screenshot of the file field arriving at my api: Image

Hoppscotch web app endpoint setup: Image

Debugger screenshot of the same endpoint request but made from the frontend form to show that the code works. Image

Thanks!

Could you please check if this issue is still reproducible in the latest version?

<!-- gh-comment-id:3479113627 --> @jamesgeorge007 commented on GitHub (Nov 3, 2025): > Hello, this was working for me a few weeks ago, now that i've reopen the project is not working for me anymore. > > I've tested in two different projects today, both use Fastify api with Fastify-multipart: https://github.com/fastify/fastify-multipart > > Tested in the Hoppscotch native app (v2025.9.1 IMac M1) and in the web app (v2025.9.2 Google Chrome) > > Debugger screenshot of the file field arriving at my api: <img alt="Image" width="348" height="220" src="https://private-user-images.githubusercontent.com/221468999/504258359-27791aee-6996-4a9d-883c-6eaf6492f957.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjIxNTIwMTgsIm5iZiI6MTc2MjE1MTcxOCwicGF0aCI6Ii8yMjE0Njg5OTkvNTA0MjU4MzU5LTI3NzkxYWVlLTY5OTYtNGE5ZC04ODNjLTZlYWY2NDkyZjk1Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTAzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwM1QwNjM1MThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hZjgwMzg0MjIwMzcxZjQxMDgxZDNkOWRkODczOTcxZmIzYjU0ODU1YzdiZTM2ZjI0YjFhZDQ4MmE5Mzk1NjU5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.gvsHbWioaTgvIP0xh95O7uCozzgQ7Q5bjhYwT5pLnBE"> > > Hoppscotch web app endpoint setup: <img alt="Image" width="1316" height="659" src="https://private-user-images.githubusercontent.com/221468999/504259010-76314355-ee99-4d26-ab64-0c1081846302.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjIxNTIwMTgsIm5iZiI6MTc2MjE1MTcxOCwicGF0aCI6Ii8yMjE0Njg5OTkvNTA0MjU5MDEwLTc2MzE0MzU1LWVlOTktNGQyNi1hYjY0LTBjMTA4MTg0NjMwMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTAzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwM1QwNjM1MThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iYmU0Mjg5OGExY2VlNjVhZjc0Y2EzNDk3NWU2MDdkYzU5YzU3ZjA1MjQzYTBhZjg3OTkwODUwM2EyZjcxZDljJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.29Bv0xro2YPm2jeQI2CJtmYGqXwXCqUGqkahc_hSTnQ"> > > Debugger screenshot of the same endpoint request but made from the frontend form to show that the code works. <img alt="Image" width="439" height="233" src="https://private-user-images.githubusercontent.com/221468999/504276546-2a0551d1-e24c-4ae3-9f6b-18642572d316.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjIxNTIwMTgsIm5iZiI6MTc2MjE1MTcxOCwicGF0aCI6Ii8yMjE0Njg5OTkvNTA0Mjc2NTQ2LTJhMDU1MWQxLWUyNGMtNGFlMy05ZjZiLTE4NjQyNTcyZDMxNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTAzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEwM1QwNjM1MThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hNjBhMDQyMGIxMmQ2YjFkMjZkNzQ4MDQ4NmU0YTJjNDUzZjRiODE0MjYxYTEwZjAyZDJiMjY1OWY5YzhhOTM0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.BqMwCajrWIS0HI7W2O7r3qaaCmpt34I5sHIsjAhEOm4"> > > Thanks! Could you please check if this issue is still reproducible in the latest version?
Author
Owner

@jYepesCIA commented on GitHub (Nov 5, 2025):

Could you please check if this issue is still reproducible in the latest version?

No longer reproducible in the native app (2025.10.0) or web app (2025.10.0), thank you.

<!-- gh-comment-id:3492418103 --> @jYepesCIA commented on GitHub (Nov 5, 2025): > Could you please check if this issue is still reproducible in the latest version? No longer reproducible in the native app (2025.10.0) or web app (2025.10.0), thank you.
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#1995
No description provided.