Solved

How to identify Size of a PDF file in JavaScript?

Posted on 2009-04-01
3
337 Views
Last Modified: 2012-05-06
Hi All,
In our ASP.NET, Ajax Based application, I have a requirement of uploading pdf files, and the need is to restrict the files to a specific file size.
It is possible to check the file with a ActiveX - FSO, which needs changes to Security settings of IE.

Is there a way to identify the size of the PDF files at the client side (Javascript) without using ActiveX objects?

Thanks in advance.
-Vidhee    
0
Comment
Question by:vidhee
  • 2
3 Comments
 
LVL 18

Expert Comment

by:Morcalavin
ID: 24038262
Without using active-x, there is no way to identify the size of a file using javascript.
0
 

Author Comment

by:vidhee
ID: 24104071
thanks a lot for the reply.
Out of curious, i have a question.
There are so many upload tools available in the market which does evaluate the file size before upload. One of the example is the ComponentArt Upload tool.
Does that mean that there are some alternatives to evaluate the file information at the client side?
0
 
LVL 18

Accepted Solution

by:
Morcalavin earned 250 total points
ID: 24704416
It is possible to check for filesize using things like Java applets, since they run client size, but have more access to the filesystem, provided they are signed and the user allows them to be installed.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question