<div dir="ltr"><span style="color:rgb(68,68,68);font-family:&#39;Lucida Grande&#39;,&#39;DejaVu Sans&#39;,&#39;Bitstream Vera Sans&#39;,Verdana,Arial,sans-serif;font-size:14px;line-height:18px">I am trying to allow files that are within the &quot;/sites/default/files/private/&quot; 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:&#39;Lucida Grande&#39;,&#39;DejaVu Sans&#39;,&#39;Bitstream Vera Sans&#39;,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&#39;s or .doc&#39;s extension. </span></div>
<div><span style="color:rgb(68,68,68);font-family:&#39;Lucida Grande&#39;,&#39;DejaVu Sans&#39;,&#39;Bitstream Vera Sans&#39;,Verdana,Arial,sans-serif;font-size:14px;line-height:18px">Is their something special that I need to do to the &quot;mime type&quot; so that IE8 will successfully download these files? </span></div>
<div><span style="color:rgb(68,68,68);font-family:&#39;Lucida Grande&#39;,&#39;DejaVu Sans&#39;,&#39;Bitstream Vera Sans&#39;,Verdana,Arial,sans-serif;font-size:14px;line-height:18px">I have listed below &quot;hook_file_download&quot; 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:&#39;Lucida Grande&#39;,&#39;DejaVu Sans&#39;,&#39;Bitstream Vera Sans&#39;,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[&#39;user&#39;];</div><div>  $roles = $user-&gt;roles;</div><div>  $pos_inside_atf_alias = stripos($uri, &#39;/inside-atf/&#39;);</div><div>  $pos_nibin_alias = stripos($uri, &#39;/nibin-user-area/&#39;);</div>
<div>  if (($pos_inside_atf_alias === false &amp;&amp; $pos_nibin_alias === false) || ($pos_inside_atf_alias !== false &amp;&amp; !(in_array(&#39;ATF Retirees&#39;, $roles) || in_array(&#39;administrator&#39;, $roles))) || ($pos_nibin_alias !== false &amp;&amp; !(in_array(&#39;NIBIN User Area&#39;, $roles) || in_array(&#39;administrator&#39;, $roles)))) {</div>
<div>    return -1;  </div><div>  } else {</div><div>    <b>$mime_type = file_get_mimetype($uri);</b></div><div><b>    return array(&#39;Content-Type&#39; =&gt; $mime_type);</b></div><div>  }</div><div>}</div></span></font></div>
</div>