File Name Validation when Uploading Images

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JonChart

    File Name Validation when Uploading Images

    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




  • Psybar Phreak

    #2
    Re: File Name Validation when Uploading Images

    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@bluey onder.co.uk> wrote in message
    news:vSJcb.27$9 U5.3@news-binary.blueyond er.co.uk...[color=blue]
    > 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[/color]
    image[color=blue]
    > i.e IMAGE1.JPG.
    >
    > Hope this is clear...
    >
    > How can this be done.
    >
    > Many thanks,
    >
    > Jon
    >
    >
    >
    >[/color]


    Comment

    Working...