I have a folder that stores the images and the path is stored in the Database.There are almost 2500+ images employee images stored there.If I want to change the physical location of this folder that has the images how do i manage the path of the path in
the Db and the virtual path ,Root and all the related info.
If I want to change the physical location of this folder that has the images how do i manage the path of the path in the Db and the virtual path ,Root and all the related info.
This is why it is sometimes nice to have a virtual directory and site set up that allow accessing the files via http. So instead of serving up the file from: "F:\Shred\Images\Files\Employee123.jpg" you might have
http://corporateimages/photos/employee123.jpg instead. This way things can change behind the scenes a bit easier if all you need is a lookup address for the image.
Fahad_fast
Member
16 Points
10 Posts
Changing the Location of the folder having images effecting the path stored in the Db.
Apr 20, 2012 01:52 PM|LINK
I have a folder that stores the images and the path is stored in the Database.There are almost 2500+ images employee images stored there.If I want to change the physical location of this folder that has the images how do i manage the path of the path in the Db and the virtual path ,Root and all the related info.
Database image
teh munk
Participant
1466 Points
297 Posts
Re: Changing the Location of the folder having images effecting the path stored in the Db.
Apr 20, 2012 04:16 PM|LINK
Run an update query on your database table and replace your old path with the new path.
Database image
atconway
All-Star
16846 Points
2756 Posts
Re: Changing the Location of the folder having images effecting the path stored in the Db.
Apr 25, 2012 07:42 PM|LINK
This is why it is sometimes nice to have a virtual directory and site set up that allow accessing the files via http. So instead of serving up the file from: "F:\Shred\Images\Files\Employee123.jpg" you might have http://corporateimages/photos/employee123.jpg instead. This way things can change behind the scenes a bit easier if all you need is a lookup address for the image.
Database image
Shoaib.Rashi...
Member
130 Points
41 Posts
Re: Changing the Location of the folder having images effecting the path stored in the Db.
Apr 25, 2012 07:47 PM|LINK
Simply run update query to update the path of all images at once