Solved

How to identify Size of a PDF file in JavaScript?

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
html Uncheck Checkbox 2 25
Make Session back to empty 9 30
on window close, not beforeunload 6 20
asp.net open new page without popup blocker 8 19
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…

821 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