<div dir="ltr"><span style="color:rgb(68,68,68);font-family:'Lucida Grande','DejaVu Sans','Bitstream Vera Sans',Verdana,Arial,sans-serif;font-size:14px;line-height:18px">I am trying to allow files that are within the "/sites/default/files/private/" directory to available to users with correct role and this is working correctly within all browsers (including IE9) except for the IE8 browser. </span><div>
<span style="color:rgb(68,68,68);font-family:'Lucida Grande','DejaVu Sans','Bitstream Vera Sans',Verdana,Arial,sans-serif;font-size:14px;line-height:18px">It does not appear to be a particular file type since it does not work with either .pdf's or .doc's extension. </span></div>
<div><span style="color:rgb(68,68,68);font-family:'Lucida Grande','DejaVu Sans','Bitstream Vera Sans',Verdana,Arial,sans-serif;font-size:14px;line-height:18px">Is their something special that I need to do to the "mime type" so that IE8 will successfully download these files? </span></div>
<div><span style="color:rgb(68,68,68);font-family:'Lucida Grande','DejaVu Sans','Bitstream Vera Sans',Verdana,Arial,sans-serif;font-size:14px;line-height:18px">I have listed below "hook_file_download" which determines when a requested file download is allowed based on a combination of the page $url and the requesting users role and I highlighted in bold the bottom of the function where it determines the mime type that is returned.</span><br>
</div><div><span style="color:rgb(68,68,68);font-family:'Lucida Grande','DejaVu Sans','Bitstream Vera Sans',Verdana,Arial,sans-serif;font-size:14px;line-height:18px"><br></span></div><div style><font color="#444444" face="Lucida Grande, DejaVu Sans, Bitstream Vera Sans, Verdana, Arial, sans-serif"><span style="font-size:14px;line-height:18px">Thanks,</span></font></div>
<div style><font color="#444444" face="Lucida Grande, DejaVu Sans, Bitstream Vera Sans, Verdana, Arial, sans-serif"><span style="font-size:14px;line-height:18px"><br></span></font></div><div style><font color="#444444" face="Lucida Grande, DejaVu Sans, Bitstream Vera Sans, Verdana, Arial, sans-serif"><span style="font-size:14px;line-height:18px">John</span></font></div>
<div style><font color="#444444" face="Lucida Grande, DejaVu Sans, Bitstream Vera Sans, Verdana, Arial, sans-serif"><span style="font-size:14px;line-height:18px"><br></span></font></div><div style><font color="#444444" face="Lucida Grande, DejaVu Sans, Bitstream Vera Sans, Verdana, Arial, sans-serif"><span style="font-size:14px;line-height:18px"><div>
function atf_retirees_file_download($uri) {</div><div> $user = $GLOBALS['user'];</div><div> $roles = $user->roles;</div><div> $pos_inside_atf_alias = stripos($uri, '/inside-atf/');</div><div> $pos_nibin_alias = stripos($uri, '/nibin-user-area/');</div>
<div> if (($pos_inside_atf_alias === false && $pos_nibin_alias === false) || ($pos_inside_atf_alias !== false && !(in_array('ATF Retirees', $roles) || in_array('administrator', $roles))) || ($pos_nibin_alias !== false && !(in_array('NIBIN User Area', $roles) || in_array('administrator', $roles)))) {</div>
<div> return -1; </div><div> } else {</div><div> <b>$mime_type = file_get_mimetype($uri);</b></div><div><b> return array('Content-Type' => $mime_type);</b></div><div> }</div><div>}</div></span></font></div>
</div>