New issue
Advanced search Search tips

Issue 835238 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

Getting empty string as mime type on ChromeOS for csv files.

Project Member Reported by upasana....@synerzip.com, Apr 20 2018

Issue description

Chrome Version: 65.0.3325.209 (Official build)(64-bit)
Platform: 10323.67.0(official build) stable-channel link 
Firmware: Google_Link.2695.1.169 
OS: Chrome OS (Chrome Pixel)

What steps will reproduce the problem?

(1) Open the attached html file(mimetypeAllEvents.html) in chrome browser.
(2) Drag and drop any .csv file

What is the expected result?
Should print the correct mime-type of dropped csv file.

What happens instead?
Prints empty string.
 
Please note: Value of 'type' in 'event.dataTransfer.files' object remains empty on Chrome OS. However, on other platforms(Windows, Mac, Ubuntu) it does give the correct mime type.

 
mimetypeAllEvents.html
858 bytes View Download
Description: Show this description
Status: Unconfirmed (was: Untriaged)
Components: -Platform>Apps>FileManager Blink>Storage>FileSystem Blink
On my dev channel (on Linux): 67.0.3396.10 I see result: text/csv

On my local dev build of chromeOS: 68.0.3404.0 I can confirm that the result is "". I added log for event.dataTransfer.files and it returns the following result attached.

However, this isn't a File Manager issue, so I'm routing to another component.

I believe this comes from Blink File System API: 
https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/fileapi/file.cc

Screenshot 2018-04-23 at 10.41.51 AM.png
61.3 KB View Download

Comment 4 by jsb...@chromium.org, Apr 23 2018

Components: -Blink>Storage>FileSystem -Blink Platform>Apps>FileManager Blink>FileAPI
Extension-to-filetype mapping is OS- and even user-dependent, which is problematic in general. See:

https://github.com/w3c/FileAPI/issues/51 and issue 155455

... but on CrOS we are in control, so could populate the mapping?


Labels: -Type-Bug CrOSFilesCategory-CodeHealth Type-Feature
Status: Available (was: Unconfirmed)
Components: Blink>Storage>FileAPI
Components: -Blink>FileAPI

Sign in to add a comment