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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.