Jump to content

Download / View a file stored in MySQL DB - I'm pulling my hair out on this one


dennishall

Recommended Posts

Hi all:

 

I have been going nuts trying to get this to work. I have gone through many attempts based on internet searches and examples that simply do not work.

 

I have files stored in my MySQL db. The files cna be of any type and are being displayed in a listed report. The files are hyperlinked and clickable, but here is the issue:

 

When I click on a file in:

http://development.products-and-services.ca/cms/test.php

I get:

http://development.products-and-services.ca/cms/test2.php?content=DHall_CV_webdev_eng.pdf

as a blank page result.

The objective is to get a file download alert or to see the file in the browser.

 

Any ideas?

Hi Litebearer and jcbones:

 

jcbones:

I had tried that post you refer to before and got zero results downloading (not different than my own results).

 

Litebearer:

My db field is Type:mediumblob Attribs:binary

I am able to echo the binary output of the file if I modify test.php to echo $content, but you will have to scroll about 20 screens to get to the download button if I do.

Based on those results, I would have expected to at least get garbage out due to in correct mime type.

 

If I can provide you further info, I'll be happy to.

 

Best Regards,

dennishall

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.