File Name Validation when Uploading Images

Discussion in 'Javascript' started by JonChart, Sep 25, 2003.

  1. JonChart

    JonChart Guest

    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
     
    JonChart, Sep 25, 2003
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:vSJcb.27$...
    > 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, Sep 27, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. darrel
    Replies:
    3
    Views:
    2,336
    Steve C. Orr [MVP, MCSD]
    Jul 23, 2004
  2. =?Utf-8?B?R2F2aW4=?=

    Uploading images to web server

    =?Utf-8?B?R2F2aW4=?=, Jan 22, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    576
    Patrick.O.Ige
    Jan 23, 2006
  3. Richard

    uploading images by users

    Richard, Feb 24, 2004, in forum: HTML
    Replies:
    6
    Views:
    398
    Asad Kazmi
    Feb 24, 2004
  4. Dung Ping
    Replies:
    10
    Views:
    1,023
    Chaddy2222
    Jan 16, 2006
  5. JonChart

    File Name Validation when Uploading Images

    JonChart, Sep 25, 2003, in forum: ASP General
    Replies:
    2
    Views:
    113
    Ray at
    Sep 26, 2003
Loading...

Share This Page