<div dir="ltr">Hello,<div><br></div><div>I've been using this go library to detect file types to block our users from uploading exes:<br><a href="https://github.com/rakyll/magicmime">https://github.com/rakyll/magicmime</a> <br></div><div><br>On a mac it is capable of using the magic.h header to detect the file type of a go program compiled for mac as mime type "<span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px">application/x-mach-binary", on Linux however, it is not able to detect those executables, only executables compiled for Linux. I'm guessing this is a matter of not having this file type registered in the magic database/file containing all the magic numbers?<br><br>This is the beginning of the file:<br></span>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(64,11,217)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">Ïúíþ</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">^G^@^@^A^C^@^@^@^B^@^@^@^Q^@^@^@</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">p</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">^M^@^@<85>^@^@^@^@^@^@^@^Y^@^@^@</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">H</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">^@^@^@</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">__PAGEZERO</span></p><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px"><br>Is it possible to add this/fix this for my own version or the next release?<br><br></span></div><div>-Matt</div></div>