blueimp / jQuery-File-Upload

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.
https://blueimp.github.io/jQuery-File-Upload/
MIT License
30.98k stars 7.98k forks source link

Empty file type for MS Office documents dropped as folder content #1759

Open x68507 opened 11 years ago

x68507 commented 11 years ago

When dropping an entire folder structure onto the DropZone, the MIME type is lost for Microsoft Office file types, replacing what should be an application specific filetype (such as application/vnd.ms-excel for Excel2003) with an arbitrary application/octet-stream. This does not occur if I open the folder and drag all the contents into the DropZone, only if I drag the actual folder itself into the DropZone.

blueimp commented 11 years ago

This is a bug in Chrome, which can be reproduced independently of the File Upload plugin. I've created JSFiddle here: http://jsfiddle.net/sGTkV/1/

Drag&Drop a MS Office file onto the "Result" pane and check the developer console. The first log entry (which is used for files not in folders) will report a File object with the correct file type. The second log entry (which has to be used for files in folders) will report a File object with an empty file type.

I've submitted this bug to the chromium issue tracker here: https://code.google.com/p/chromium/issues/detail?id=155455