dennishall Posted September 17, 2010 Share Posted September 17, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/213684-download-view-a-file-stored-in-mysql-db-im-pulling-my-hair-out-on-this-one/ Share on other sites More sharing options...
litebearer Posted September 17, 2010 Share Posted September 17, 2010 what data type is the db field? Quote Link to comment https://forums.phpfreaks.com/topic/213684-download-view-a-file-stored-in-mysql-db-im-pulling-my-hair-out-on-this-one/#findComment-1112313 Share on other sites More sharing options...
jcbones Posted September 17, 2010 Share Posted September 17, 2010 Try Here Quote Link to comment https://forums.phpfreaks.com/topic/213684-download-view-a-file-stored-in-mysql-db-im-pulling-my-hair-out-on-this-one/#findComment-1112316 Share on other sites More sharing options...
dennishall Posted September 18, 2010 Author Share Posted September 18, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/213684-download-view-a-file-stored-in-mysql-db-im-pulling-my-hair-out-on-this-one/#findComment-1112537 Share on other sites More sharing options...
jcbones Posted September 19, 2010 Share Posted September 19, 2010 comment out your db connection, and post some code, otherwise we are just guessing. Quote Link to comment https://forums.phpfreaks.com/topic/213684-download-view-a-file-stored-in-mysql-db-im-pulling-my-hair-out-on-this-one/#findComment-1112670 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.