I am displaying file names as links on the page, when I click on particular link, it should ask the user that, save file or view file something like below image.
In my case this popup is not coming, directly the file content is displaying on browser. So how can I achieve this. Thanks for your any suggestions.
My code to display dynamic links as follow:
$uri = 'public://';
$path= file_create_url($uri);
$data .= '<div class = "public-file-names"><a href="'.$path . $foldnames .'/'. $filenames.'">' ."--". $filenames .'</a><br></div>';