Links to Attachments

Catalina

Registered User.
Local time
Yesterday, 16:09
Joined
Feb 9, 2005
Messages
471
With the database I'm working on for someone I need to link images.

The way I see it there are two options:

1 Store the full path to the image (like d:\databases\movies\myfile.jpg)

or:

2 Store the path relative to the backend location (\movies\myfile.jpg)
Then concatenate the backend path and link to view the image.

I use option 2 on one of my applications and the advantage is
that the links stay valid no matter where the backend is located.

Option 1 will give the user a more freedom of where to store the images.
However, with any changes in location the links will break.

I could even give the user a choice of which option to use.

Does anyone have any thoughts about this?

All ideas will be greatly appreciated.

Catalina
 
I know that most users say never store a picture in the database, but I do. I just create a separate backend just for ole objects or attachments so you don't slow down where the real data is stored. If your running 2007 or above the attachment field is great, otherwise ole objects work well also but you have to ensure your default extension is something microsoft likes, i.e, jpg or bmp use Paint as the default program, .pdf use Adobe etc. This way you will never lose a link if the user moves the file.
 
Thanks for the response but I absolutely don't want to store images in the database.
 

Users who are viewing this thread

Back
Top Bottom