Hey thanks Ian! 
Could I have some examples, of say a pdf or zip?
It looks like this will work perfectly!

-----Original Message-----
From: Ian Samuel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 9:00 AM
Subject: RE: [PHP] Previous Discussions

>>Is anyone aware of previous discussions with php/mysql with 
>using file 
>>inside the db (BLOBs) and integrating php to serve these files? In my 
>>opinion, I'm sure there's a better way than store to a temp 
>file and send 
>>user the hyperlink, then deleting the temp file. Perhaps 
>something with 
>>output buffering, etc. 

Regardless of whether this is a good idea or not, it's fairly easy. Store the file 
data itself (accessible via fopen($whatever)) in a longblob, then write it back with 
the appropriate headers ("Content-type: iamge/jpeg" or whatever) when the time comes. 
I'd be happy to provide examples if anyone is curious.

Ian Samuel 

Reply via email to