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 6695565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:14:13+00:00 2026-05-26T06:14:13+00:00

I am working with a file type input. I would like to display the

  • 0

I am working with a file type input. I would like to display the file size after the file has been selected. I am thinking I should use some jquery to pull that, but I am not sure how. Can I do that?

<input type="file" id="uploadFile" name="uploadFile"/>
  • 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-05-26T06:14:13+00:00Added an answer on May 26, 2026 at 6:14 am

    This should show it if the browser has the capability (firefox, chrome, opera(?) ):

    jQuery( "#uploadFile").bind( "change", function(){
        if( this.files && this.files.length ) { //If this condition passes, you can get file size
        var file = this.files[0],
        fileSize = file.size || file.fileSize || 0;
        alert(fileSize+ " bytes" );
        }
    });
    

    demo here: http://jsfiddle.net/yNQ9M/1/ (updated to work in firefox and opera)

    You can also use ActionScript (Flash) hacks to do it in older browsers.

    Microsoft is working on the File API in ie10

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

Sidebar

Related Questions

My form has a input file type field. <input type=file name=file size=80 value=> when
Given a postscript file that has the following header %!PS-Adobe-3.0 I would like to
I have a form with field <input type=file name=file size=100 value=> if this field
I am working on an app that uses a custom file type, I've figured
I'm working on a file format that should be written and read in several
I'm working on a CSS file and find the need to style text input
We have a page that accepts video file uploads using a plain <input type=file
I am working on a program that take user input for two file names.
When I am working on a PHP file for example the default filetype is
I have a working file rename java tool, now I want to add an

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.