I am new to Zend Framework 2 and I know only a few reasons. It’s also hard for me to find many examples.
Quesiton: Get the BLOB field in the database and display it through the controller. For example: www.mysite.com/images/2 will extract the BLOB from the database and display it to the user as an image, therefore an html tag such as <img src="http://www.mysite.com/images/2"/> , displays the image.
I usually do this in ASP.NET MVC, but have no idea how to do it here. I would be glad if someone could enlighten me on how to achieve this.
Suppose I select an image from a database.
I managed to find how to return JSON and believe that such a simple thing would work. But could not find a solution. I will also need to send such files.
public function displayAction() { $id = 10; $albumImage = $this->getAlbumImageTable()->getAlbumImage($id); if ($albumImages){
I would have been obliged if someone could help.
Thanks in advance.
source share