Solved

How to identify Size of a PDF file in JavaScript?

Posted on 2009-04-01
3
335 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
Comment Utility
Without using active-x, there is no way to identify the size of a file using javascript.
0
 

Author Comment

by:vidhee
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
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…

763 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

6 Experts available now in Live!

Get 1:1 Help Now