Re: Limiting fileupload file types
From: Kevin Spencer (kspencer_at_takempis.com)
Date: 11/29/04
- Next message: Cheryl: "sub-totals not using database wizard - using SQL DB"
- Previous message: ik: "Limiting fileupload file types"
- In reply to: ik: "Limiting fileupload file types"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 13:51:37 -0500
I'm not sure how you'd do this with Frontpage, but I can tell you how it's
done on the client-side using JavaScript. You would want to write a
JavaScript function that checks the "value" attribute of the "input
type=file" form field. It would parse the file path, and starting from the
last "." check the file extension. If it wasn't the correct extension, it
would cause the form validation to return false, preventing the submit of
the form.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Neither a follower nor a lender be. "ik" <ik@discussions.microsoft.com> wrote in message news:A65E8D47-41A9-41B3-AE26-4B010F0EBFC4@microsoft.com... > I'm using FP 2002 fileupload component to allow files to be uploaded to my > website. Currently site visitors can upload any type of file. I would like to > limit the type of files uploaded to say only pictures (*.jpg). Is there a way > to do this? > Thanks in advance for your response. >
- Next message: Cheryl: "sub-totals not using database wizard - using SQL DB"
- Previous message: ik: "Limiting fileupload file types"
- In reply to: ik: "Limiting fileupload file types"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|