New issue
Advanced search Search tips

Issue 679710 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Uploading .app file using HTML5 drag and drop fails

Reported by v...@tagstr.co, Jan 10 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36

Steps to reproduce the problem:
1. Download any MacOS .app file
2. Add a "drop" listener on an element you will drag this file to
3. Drop the file onto the element
4. The event.DataTransfer.items will recognise the package as directory 

What is the expected behavior?
I have tested it against Safari - safari treats the drag and drop event the same way as adding the file to the file upload element. When the upload starts it actually generates .app.zip file same way chrome does when the file is added through the file input.

What went wrong?
When the drop event is handled the .app file is recognised as a directory (I cannot say whether its the same case with the adding the file through file input) I'd assume that the expected behaviour would be the same the "directory" would get compressed to zip or there should be a method to actually trigger the same behaviour as per adding the .app file through file input. 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 55.0.2883.95  Channel: stable
OS Version: OS X 10.12.1
Flash Version: 

This may not be a bug but expected behaviour but I think there should be at least an api allowing manually trigger the same behaviour as per file input that automatically compresses the file to ZIP (safari does it automatically though)
 
Labels: Needs-Feedback
Thanks for the report, could you please help for the step 2(creating a drop listner), to triage it further from test Engg team.

Comment 2 by phistuck@gmail.com, Jan 11 2017

Please, specify a URL that reproduces the issue (when someone drags an .app file into it), or attach a simple HTML page show reproduces the issue.
Labels: -Needs-Feedback Needs-Triage-M55
Labels: Needs-Feedback
vic@tagstr.co@ : Could you please update the thread as per the above comment #1 to triage further.
Components: -Blink>JavaScript Blink
Components: -Blink Blink>DOM
Components: -Blink>DOM Blink>DataTransfer
Observed behavior makes sense--OS X apps are folders; Chrome has directory upload for DnD but maybe Safari doesn't; etc. Not sure of the standards status of directory upload stuff. Possible interim workaround: The user generates a ZIP on the client.

Comment 8 by jsb...@chromium.org, Feb 13 2017

FWIW a spec covering the directory DnD behavior in Chrome and now implemented in Firefox and Edge is at: https://wicg.github.io/entries-api/ - lots of funky cases to consider, but doing the workaround should be feasible.

(We should spin up a sample.)



Project Member

Comment 9 by sheriffbot@chromium.org, Mar 16 2017

Status: Archived (was: Unconfirmed)
No feedback was received in the last 30 days from reporter "vic@tagstr.co", so archiving this. Please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment