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

I understood that part, but that's about it.

Where is this code used? How do you call it? Why do you think moving the validation from the disk based method to the database method would be enough? Where do you get your file? Does the current code work? What happens when you upload an image right now? Does it work? If not, do you get an error? And so on and so on. All relevant information if you need help....

Anyway, I would take one step back if I were you. At the place where you define the value for sPath and before you call SaveToDisk, look into that string, and see if it ends with an extension you want to allow using VB Script's Mid, Left and Right functions.

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