Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7795365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:03:24+00:00 2026-06-01T23:03:24+00:00

I am using express v2.5.8. I am uploading a file from a multipart form

  • 0

I am using express v2.5.8. I am uploading a file from a multipart form where the file input in the form is classified as a file:

Form:
enctype=”multipart/form-data”

Element:
type=’file’

Within the server side app, I have set the following:
app.use(express.bodyParser({uploadDir:’./files/ph’})), //valid directory and no write issues

I have also required the ‘fs’ module.

Within the form handling route, I can see req.body but when I try to access req.files, it seems to be undefined & when I check the req.is(‘image’), the result is false.

Any suggestions on handling image uploads from a html form handled via express would be appreciated.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:03:25+00:00Added an answer on June 1, 2026 at 11:03 pm

    I switched to node-formidable and it works for me – I will check above logic again once I use express v3.0/connect v2.0 (it seems like req.files for multipart data is available in express 3.0/connect 2.0 though I am not entirely certain so please do your own due diligence about it).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I uploading the images using connect-form and express as in https://github.com/visionmedia/express/blob/cbdd907393e6fc9cf4eb092237241d1626a9a98d/examples/multipart/app.js . The images
I'm using express and having trouble getting form data from the bodyParser. No matter
I'm using express framework. I want to reach session data from socket.io. I tried
I am using SQL EXPRESS EDITION 2005 and Created mdf data file using vb.net
I'm using Express and Node.jx 0.6.7. Server is EC2 Small instance.. For some reason,
I'm using Express.js to create a server to which I can connect using web
I am using express with node.js for a http server. I store the response
I'm using express-validator to do form validation on the request object in Express. I
I am using SQL Server 2008 Express and I cannot buy the full version
I am using visual c# 2010 express edition and sql server 2008 R2 Express

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.