I am working on a web app and I decided (after reading many post on SO) to store the actual images in the file system and to store the metadata in the DB.
Should I store a relative path or an absolute path.
I can think of some advantages for each of the choices.
Absolute:
Pros:
It is obvious where the file is even to other apps reading the DB
Can put the photos anywhere on the drive (would require an handler)
Cons:
Need to convert the absoulte path to a relative path for use in the site or create a handler
If I migrate to another server I may have to change all the paths
Relative:
Pros:
Simply add the link to the html and it works
Cons:
If I change the app root I have to move the pictures or change all the paths
Have to put the pictures in a public directory (Or I gain nothing over the absolute path)
Ok these are some of things going on in my head right now.
I can't decide.