View Single Post
  #21 (permalink)  
Old March 10th, 2007, 09:44 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Assuming sPath contains a full file path, you can indeed check if it ends on .jpeg or .gif to make sure you only allow images to be uploaded.

However, since you're creating a text file:

Set oFile = oFS.CreateTextFile(sPath & FileName, True)

I doubt you'll ever get an image on the server....

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote