View Single Post
  #2 (permalink)  
Old April 6th, 2006, 02:48 PM
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: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Mike,

While I am sure other people may have different opinions on this, I'd like to store the images as a virtual root path. That way, you can easily move your site to a different location, and things will still work.

E.g. I store something like

/Images/Uploads/2006/04/SomeFile.gif

Using Server.MapPath you can easily translate this to a physical path. When the time comes you have to move your image to a folder outside your web root, you can add a virtual folder to your site, call it Images and things will still work.

My 2 cents....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Reply With Quote