Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Upload Validation


Message #1 by "Tiago Nogueira" <tnogueira@m...> on Wed, 7 Mar 2001 08:14:41 -0300
You could possibly do it by using the FileSystemObject on the client. You
could use the supplied filename from the <input type=file> to get
information about the file.

The problem with this is that this will only work on IE and the user will
have to lower the security settings for the browser to allow access to the
filesystem.

Julian Dobson
Systems Developer
Wrox Press Inc
http://www.wrox.com

Tel:	(203) 781 2300
Fax:	(203) 781 2301
Pager:	(888) 782 8667
Mobile:	(203) 675 5052


-----Original Message-----
From: Mark Strangways [mailto:strangconst@h...]
Sent: Thursday, March 08, 2001 11:21 AM
To: javascript
Subject: [javascript] Re: Upload Validation


OK, first off. The asp is Important... With just the information you have
presented to use, I'd say no it can be done.
I have a web application where I allow extensive uploading, so I'm quite
familar with many of the functions that can be used to upload. I started out
with MS Posting Acceptor, BAD IDEA. I finally settled on the SAFileUP, GOOD
IDEA. With the FileUp object there are properties for just about anything in
it, you can check file size, you can check MIME type, etc etc etc... By
itself there is no ASP way of uploading from a client to the server that I
know of... Now back to the question at hand,,, If you want help , then
posting the code is a very good way to communicate the stucture and how you
are approaching the upload. I don't know of a Javascript function that will
allow you to retreive the file size from the fom fields.

Mark
----- Original Message -----
From: "Tiago Nogueira" <tnogueira@m...>
To: "javascript" <javascript@p...>
Sent: Thursday, March 08, 2001 7:12 AM
Subject: [javascript] Re: Upload Validation


Mark,
I think i did not make my self clear, sorry.
The asp code is not important here, 'cause i need to do
the validation in the client side.
I have a <form><input type="file">...</from>.
My question is : Can i do the validation of the size of
the file in the <input type="file">????



-----Original Message-----
From: Mark Strangways [mailto:strangconst@h...]
Sent: Wednesday, March 07, 2001 19:11
To: javascript
Subject: [javascript] Re: Upload Validation


Why don't you include your asp source code so we can help you with this
problem. ?
----- Original Message -----
From: "Tiago Nogueira" <tnogueira@m...>
To: "javascript" <javascript@p...>
Sent: Wednesday, March 07, 2001 11:34 AM
Subject: [javascript] Re: Upload Validation


Douglas,
I use ASP script to do the upload, i do not use
components. I just want to know if it's possible to make a validation of
the file size ( I know how this is done form asp , but i don't want to
submit the form if the file size is bigger than 1 Mega ).

Tiago

-----Original Message-----
From: Mark Strangways [mailto:strangconst@h...]
Sent: Wednesday, March 07, 2001 11:48
To: javascript
Subject: [javascript] Re: Upload Validation


What are you using to create the upload,  there are several ready made
fuctions to use.
Most of these will provides some form of file atrriubute and size
prpoperties.


----- Original Message -----
From: "Tiago Nogueira" <tnogueira@m...>
To: "javascript" <javascript@p...>
Sent: Wednesday, March 07, 2001 6:14 AM
Subject: [javascript] Upload Validation


    Hi all,
            May I use a javascript function to limit the size of a file
upload?
            For example, i want to limit the size of a file to 1.000
bytes , can it be done with JavaScript???
I use a Input type file tag.

        Thanks,

Tiago Nogueira
http://www.metatron.com.br
+ mailto:tnogueira@m...
( (55-21)518-1072 Ramal 217


  Return to Index