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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:44:59+00:00 2026-05-11T13:44:59+00:00

How can I check the size of an image a user is uploading? Client

  • 0

How can I check the size of an image a user is uploading? Client side first with server side double check would be the best solution.

  • 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. 2026-05-11T13:45:00+00:00Added an answer on May 11, 2026 at 1:45 pm

    What you describe is the ultimate battle to get more information of the HttpFileUpload in HTML 2.0 specs, as that the is HTML spec you are referencing for a Form POST. Unfortunately, HttpFileUpload does not allow you to get this – not even in Javascript. It’s a very common problem.

    Two solutions:

    • The normal solution is to change your web.config and modify the http runtime (how long to allow an upload, like 30 minutes for a big file) and the http filesize to increase the limit (default is 4 MB). This applies to Ruby/php, ASP.NET, and ASP.NET MVC – it applies to all languages as it is the HTML 2.0 spec that limits the HttpFileUpload data you can obtain on a form POST. This will allow the user to upload the entire file; and then, you would process the restrictions on your side in server code. Not the best solution; but, it is the only solution unless you use a 3rd part.

    • Use a 3rd party ‘file monitor’ plugin.

    One of the easiest I’ve seen is RadControls by Telerik. What these controls do us they install an HttpModule, HttpHandler, and special javascript. There are several 3rd parties out there that does does, but basically this is how it works:

    • Javascript captures the HttpFileUpload submission, and re-routes the form POST to a special handler (/RadControlsUploadHandler.asmx for example).
    • The RadControlsUploadHandler updates a static variable of the actual bytes uploaded in realtime.
    • Then the Javascript loads a ‘Progress Bar’ popup that constant hits the RadControlsUploadHandler.asmx for a ‘Status’ update. This status update executes the HttpModule that reads the static variable data that is in process of the original Form post to the same handler.
    • Then, the module returns JSON data back through the ‘Progress Bar’ ajax call, giving the status of the amount of bytes upload, the bandwidth estimated etc.

    Here’s a demo of Telerik’s Progress Bar upload:

    http://demos.telerik.com/aspnet-ajax/upload/examples/customprogress/defaultcs.aspx

    Personally, I don’t like not knowing how they are locking the thread for these uploads – as I have scalability concerns when using these 3rd party tools under high use. But, for Joe Bloe’s blog, they are great tools for.

    Problem w/ASP.NET MVC

    The problem with these 3rd party tools is that they only work under ASP.NET WebForms – the standard ASP.NET. ASP.NET MVC removes the entire ASP.NET WebForms concept – therefore, rendering these controls useless.

    Humm, perhaps there’s a new project for someone to write. 🙂

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

Sidebar

Related Questions

Can I check with jQuery whether the User increased the font size and bind
i want to check image size once user select an image from gallery.Because big
I have PHP form where a user can upload an image. I check this
How can I check the size of an unsigned in the preprocessor under g++?
I have a check box list in that user can check or uncheck the
Using JavaScript, how can I determine the size of an image which is not
i am giving a field to user where he can upload any image file
I have a requirement in which the user can select an image from camera
Can check out here alt text http://51hired.com/static/problem.bmp
I can check for iPhone with this code: (navigator.userAgent.match(/iPhone/i)) But I want to target

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.