Solved

How to identify Size of a PDF file in JavaScript?

Posted on 2009-04-01
3
336 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now