HighDots Forums  

File Name Validation when Uploading Images

Javascript JavaScript language (comp.lang.javascript)


Discuss File Name Validation when Uploading Images in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JonChart
 
Posts: n/a

Default File Name Validation when Uploading Images - 09-25-2003 , 06:19 PM






Hi all,

I would like to know ho to validate a file name when uploading via asp and
whether or not this can be validated with javascript?

I need to upload 2 images and the file names must be the same...

1) browse for 1st image.
2) image path and file name appears in text box i.e. IMAGE1.JPG
3) browse for 2nd image.
4) 2nd image file name MUST match the file name in the text box of 1st image
i.e IMAGE1.JPG.

Hope this is clear...

How can this be done.

Many thanks,

Jon





Reply With Quote
  #2  
Old   
Psybar Phreak
 
Posts: n/a

Default Re: File Name Validation when Uploading Images - 09-27-2003 , 09:56 AM






not exactly what you want, but is a head in the right direction - this
checks that the file is indeed an image file, add more extensions as you
like

PP

-----

var picPat = "^.*(\.(gif|jpg|bmp))$";

------



"JonChart" <jonchart (AT) blueyonder (DOT) co.uk> wrote

Quote:
Hi all,

I would like to know ho to validate a file name when uploading via asp and
whether or not this can be validated with javascript?

I need to upload 2 images and the file names must be the same...

1) browse for 1st image.
2) image path and file name appears in text box i.e. IMAGE1.JPG
3) browse for 2nd image.
4) 2nd image file name MUST match the file name in the text box of 1st
image
i.e IMAGE1.JPG.

Hope this is clear...

How can this be done.

Many thanks,

Jon







Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.