Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > File Name Validation when Uploading Images

Reply
Thread Tools

File Name Validation when Uploading Images

 
 
JonChart
Guest
Posts: n/a
 
      09-25-2003
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
 
 
 
 
Psybar Phreak
Guest
Posts: n/a
 
      09-27-2003
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" <(E-Mail Removed)> wrote in message
news:vSJcb.27$(E-Mail Removed)...
> 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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation of Data before uploading of excel to sql db anilgiri2010a ASP General 0 01-25-2012 01:00 PM
Is there a way to automate zipping a folder with a unique file name and than uploading it via FTP? Marc Computer Support 2 04-04-2007 05:52 PM
ftp uploading vs. control panel uploading Dung Ping HTML 10 01-16-2006 10:43 AM
uploading FOLDERS of images via .net darrel ASP .Net 3 07-23-2004 10:11 PM
File Name Validation when Uploading Images JonChart ASP General 2 09-26-2003 12:43 PM



Advertisments