mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #5233] [bug]: File uploads incorrectly set MIME type as text/plain instead of actual file type #1995
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1995
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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?
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.
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
@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
@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.
@arentalb commented on GitHub (Aug 4, 2025):
Use the PWA for now until they fix it , the web version (PWA) works fine
@codingPotato21 commented on GitHub (Aug 4, 2025):
Alright will do, thank you
@jamesgeorge007 commented on GitHub (Aug 8, 2025):
Hi, this is addressed in the latest release. Please let us know if the issue persists.
@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:

Hoppscotch web app endpoint setup:

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

Thanks!
@jamesgeorge007 commented on GitHub (Nov 3, 2025):
Could you please check if this issue is still reproducible in the latest version?
@jYepesCIA commented on GitHub (Nov 5, 2025):
No longer reproducible in the native app (2025.10.0) or web app (2025.10.0), thank you.