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

  • Home
  • SEARCH
  • 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 6030901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:06:22+00:00 2026-05-23T05:06:22+00:00

I am using AsyncFileUpload in order to allow users to asynchronously upload files. I

  • 0

I am using AsyncFileUpload in order to allow users to asynchronously upload files.

I want to limit the size of the file to 1MB.

So far as to what I’ve seen I can only get the length of the file upon upload completion

like when upload starts:

(OnClientUploadStarted)

function UploadStarted(sender,args) 
{
   //if bigger than 1MB (approximately)
   if (args.get_length() > 1000000 ) 
   {
       ShowActionNotificationError( errorMessage); 
       return false;  
    }
}

args.get_length() is null , so I can’t use it…

And when upload is completed:

(OnClientUploadComplete)

function UploadComplete(sender,args) 
{
    //if bigger than 1MB (approximately)
    if (args.get_length() > 1000000 ) 
    {
        ShowActionNotificationError( errorMessage); 
        return false;  
    }
}

works ok, but file was already uploaded…

So How can I know the size of the file before uploading it? am I missing something very simple?

I would really like to do it without handling HTTP Request length and the sort.

Thanks!

  • 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-23T05:06:22+00:00Added an answer on May 23, 2026 at 5:06 am

    After some substantial research I realize this cannot be done using AJAX.

    As I look around at sites like yahoo mail and gmail, it’s done by Flash.

    in hotmail it’s done with Silverlight.

    there is a free (for now) flash upload control called Uploadify…

    I am now working on integrating it.

    if I’m wrong please correct me! 🙂

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

Sidebar

Related Questions

I am trying to upload an image of size 800kb using Ajax AsyncFileupload control
I have added AJAX Controls. Is it possible to upload multiple files using AsyncFileUpload
I'm using the AsyncFileUpload control to upload images. It works fine from localhost, but
I'm using an AsyncFileUpload (AJAX Toolkit) to upload images. I have a Button which
I am using Asyncfileupload AJAX control, and want to know if there is anyway
I have an asyncfileupload control that I'm using from the ajaxcontroltoolkit. On the file
Using PHP and MySQL, I want to query a table of postings my users
I have uploaded files to the server using AsyncFileUpload. How can I display the
I am using Ajax File Upload control in ASP.NET 4 using c#. The same
I have a web form that allows users to upload files while opening a

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.