New issue
Advanced search Search tips

Issue 676671 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

file.type is empty for .json files when using <input type="file"> on Windows

Project Member Reported by ericbidelman@chromium.org, Dec 22 2016

Issue description

Chrome Version: 55.0.2883.87
OS: Windows 10l1

On Windows, examining a .json file from an input type="file" returns the type as empty (file.type === "") on Windows 10.1 I've tested this on a VM and an actual device. On Mac, it is correctly "application/json".

What steps will reproduce the problem?
(1) Visit http://jsbin.com/bodadutupi/edit?html,output
(2) Upload a .json file from your machine. One is attached if needed.

What is the expected result?

An alert saying "type: application/json". This is the behavior of Mac.

What happens instead?

An alert saying "type: ".



 
results2.json
55.9 KB View Download

Comment 1 by tkent@chromium.org, Dec 26 2016

Status: WontFix (was: Untriaged)
This works as intended.  We retrieve the MIME type information from OS, and Windows 10 doesn't register any information of .json by default.  I confirmed Firefox and Edge had the same behavior.

The specification allows to return an empty string.
https://w3c.github.io/FileAPI/#dfn-type

Components: Blink>Storage>FileAPI
Components: -Blink>FileAPI

Sign in to add a comment