<ul dir="auto">
<li>Electron version: 1.4.0</li>
<li>Operating system: macOS 10.12.4</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">When uploading Chess in the Applications folder through  <code class="notranslate">&lt;input type="file" /&gt;</code>, <code class="notranslate">event.target.files[0].type</code> should be <code class="notranslate">application/zip</code>, which is the case when uploaded in Chrome.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto"><code class="notranslate">event.target.files[0].type</code> is an empty string.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Run the following the code in some page loaded by Electron and Chrome, different logs are displayed in dev tools.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var input = document.createElement('input')
input.type = 'file'
input.addEventListener('change', e =&gt; console.log(e.target.files[0]))
document.body.appendChild(input)"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-s">'input'</span><span class="pl-kos">)</span>
<span class="pl-s1">input</span><span class="pl-kos">.</span><span class="pl-c1">type</span> <span class="pl-c1">=</span> <span class="pl-s">'file'</span>
<span class="pl-s1">input</span><span class="pl-kos">.</span><span class="pl-en">addEventListener</span><span class="pl-kos">(</span><span class="pl-s">'change'</span><span class="pl-kos">,</span> <span class="pl-s1">e</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-c1">target</span><span class="pl-kos">.</span><span class="pl-c1">files</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
<span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-kos">.</span><span class="pl-en">appendChild</span><span class="pl-kos">(</span><span class="pl-s1">input</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">Electron:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2097644/25272350/08fad382-26ba-11e7-8032-1a6c05350072.png"><img src="https://cloud.githubusercontent.com/assets/2097644/25272350/08fad382-26ba-11e7-8032-1a6c05350072.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Chrome:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2097644/25272467/916658fe-26ba-11e7-8e5b-b819c25eb262.png"><img src="https://cloud.githubusercontent.com/assets/2097644/25272467/916658fe-26ba-11e7-8e5b-b819c25eb262.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">We can see that the <code class="notranslate">name</code>, <code class="notranslate">size</code> and <code class="notranslate">type</code> properties have different values.</p>
<ul dir="auto">
<li>Electron version: 1.6.2</li>
<li>Operating system: macOS 10.12.3</li>
</ul>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">I faced with strange behaviour of <code class="notranslate">&lt;input type='file' /&gt;</code> in Electron.<br>
You can select special Macs' folders - app folders (for example <code class="notranslate">/Applications/Calculator.app</code>).<br>
In Finder it looks like file, but it's directory!</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">There are two possible ways.</p>
<ol dir="auto">
<li><code class="notranslate">Chrome</code>way (and Safari). In real Chrome you can select <code class="notranslate">Calculator.app</code> from <code class="notranslate">&lt;input type='file' /&gt;</code>. But Chrome transparently created <code class="notranslate">Calculator.app.zip</code> and attached this archive to input.</li>
<li><code class="notranslate">Firefox</code> way. In Firefox you can not select any folders from <code class="notranslate">&lt;input type='file' /&gt;</code></li>
</ol>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">I have created simple fiddle for that <a href="https://jsfiddle.net/s7c7k33b/" rel="nofollow">https://jsfiddle.net/s7c7k33b/</a> for testing in different browsers and Electron</p>