Avatar of namsu55
namsu55
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

Storing Image in MYSQL Blob and Retrieving as a Downloadable Link

I am storing images into MySQL as type BLOB. I want to know how do I get the filename of the file (a.jpg) and make the link available for download rather than show.

Currently:
I can only get the jpg as I found this on the internet: but I would like the file name as well as the extension.
$ext = explode('.', $_FILES['userFile']['name']);
$filename = $_POST['userName'] . '.' . $ext[count($ext)-1];
PHP

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon