WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 25879
WebKit should either handle directory uploads or refuse directory drags
https://bugs.webkit.org/show_bug.cgi?id=25879
Summary
WebKit should either handle directory uploads or refuse directory drags
Eric Seidel (no email)
Reported
2009-05-19 17:52:40 PDT
It's currently possible to drag a directory onto a <input type="file"> control. It's not possible to pick one from the file picker. If we're going to support dragging directories onto a file control we need to do something intelligent (like auto-zipping the directory on submission). If we don't want to support dragging directories onto file controls, we need a good UI for when we prevent it (like showing the "can't drop" cursor during the drag). If a drag has both files and directories in it, we should treat it the same as if it just has a directory, I think. Either way we need to handle this case. Currently when you try to submit a directory, we do the following: Safari can’t open the page. Safari can’t open the page “
https://bugs.webkit.org/attachment.cgi
”. The error is: “Operation could not be completed. Is a directory” (NSPOSIXErrorDomain:21) Please choose Safari > Report Bugs to Apple, note the error number, and describe what you did before you saw this message. Instead we should throw a JS exception on form.submit() or something (or maybe we already do, I clicked the "submit" button manually). I can break this into multiple bugs as needed.
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2009-05-19 17:55:30 PDT
Three tests for directory dragging are being added in editing/pasteboard/file-input-files-access.html as part of
bug 25852
.
Eric Seidel (no email)
Comment 2
2009-05-21 00:32:57 PDT
Looks like the zipping behavior is intended!
https://bugs.webkit.org/show_bug.cgi?id=21115
Eric Seidel (no email)
Comment 3
2009-05-21 00:46:44 PDT
Zipping behavior is client defined, it seems. I guess the current Safari client only choses to zip bundles, leaving CF Network to fail when trying to send directories. This bug is about that we should *refuse* the drag if we can't handle them. Or handle the directories properly if we accept the drag. Anything else is confusing to the user.
Eric Seidel (no email)
Comment 4
2009-05-21 00:47:57 PDT
Changing title to "WebKit should either handle directory uploads or refuse directory drags" currently we both accept the drag and fail the upload, see the above mentioned CFNetwork error message.
Eric Seidel (no email)
Comment 5
2009-05-21 00:49:58 PDT
Related
https://bugs.webkit.org/show_bug.cgi?id=25913
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug