Store File, or just path?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
gotlisch
Forum Newbie
Posts: 23
Joined: Wed Jan 11, 2006 8:37 am

Store File, or just path?

Post by gotlisch »

Hi,

I'm pretty much trying to create an admin page where I can upload images to the server and then display these images. I've know how to upload a whole file to MySQL, but can I then retrieve the file and display it, or is this just for actually downloading the file. Should I store the path instead if I just want to display the image?


Cheers

Mikael
User avatar
jwalsh
Forum Contributor
Posts: 202
Joined: Sat Jan 03, 2004 4:55 pm
Location: Cleveland, OH

Post by jwalsh »

I personally store the filename only, and link to the original. Mainly because I'm anal about MySQL backups regularaly, and it takes forever with all the binary content.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

We've had this discussion several times throughout the forum, so it shouldn't be too hard to dig up why it is a bad idea. Although it does seem like a good idea, it is infact much slowwwwwwwwer than storing the filename.
gotlisch
Forum Newbie
Posts: 23
Joined: Wed Jan 11, 2006 8:37 am

Thanks...

Post by gotlisch »

Thanks guys,

I will go with the file path then....
Post Reply