By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,086 Members | 1,452 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,086 IT Pros & Developers. It's quick & easy.

File Name Validation when Uploading Images

P: n/a
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


Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <jo******@blueyonder.co.uk> wrote in message
news:vS************@news-binary.blueyonder.co.uk...
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

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.