When a user logs in they can view images they have uploaded (these images are not in a public folder), a user cannot see another users images.
In procedural php i can use something like this (i'll also check whether the user can have access to the image):
$file_path ='my-private-folder/avatar.jpg'; header("Content-Type: image/jpeg"); readfile($file_path); exit();
and then I would call it by <img src="image.php">
The problem i'm having is:
The above would display a blank page and just the image, but I need this to be accessible so I can place the image in a table (ie. place the image in full web template wherever I want).
- I need to do the above in oop in phalcon, so how do I access the image from the view?