I have created a web application (Framework7 CLI), that is using pictures and videos outside the server’s public directory.
Everything worked well until I added routing with url (pushState = true)
When the pushState is enabled, the link to the file outside the public directory stops working …
can you help me?
some_file.f7.html
<img class="image-preview" src="getIcon.php?param={{some_server_path}}">
getIcon.php
$path = $_GET['param'];
$file = 'home/no_public_dir/imgs/'.$path;
$file_name = basename($path);
header('Content-Type: image/jpg');
header('Content-Disposition: attachment; filename="'.$file_name.'"');
echo file_get_contents($file);