I have a folder that stores images and the paths to the images are stored in the database. There are almost 2500+ employee images stored there.
If I want to change the physical location of the folder that has the images, how do I manage the stored paths in the DB and the virtual path, root and all the related info.
Well, here is what I would do:
- Copy your images to the new directory. (Leave the old directory in place for now)
- Run a SQL update script on your DB to change the stored location. (Without knowing your db structure I can't say more.)
- Update your app code to point to the new directory.
- Test your app to verify that is uses the new directory.
- Rename the old directory to something else, so that any link to it would break.
- See if anything is broken, and fix it!
I have a folder that stores images and the paths to the images are stored in the database. There are almost 2500+ employee images stored there.
If I want to change the physical location of the folder that has the images, how do I manage the stored paths in the DB and the virtual path, root and all the related info.
Well, here is what I would do:
- Copy your images to the new directory. (Leave the old directory in place for now)
- Run a SQL update script on your DB to change the stored location. (Without knowing your db structure I can't say more.)
- Update your app code to point to the new directory.
- Test your app to verify that is uses the new directory.
- Rename the old directory to something else, so that any link to it would break.
- See if anything is broken, and fix it!
0 commentaires:
Enregistrer un commentaire