<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>25879</bug_id>
          
          <creation_ts>2009-05-19 17:52:40 -0700</creation_ts>
          <short_desc>WebKit should either handle directory uploads or refuse directory drags</short_desc>
          <delta_ts>2009-06-05 10:58:39 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>21115</dependson>
    
    <dependson>25852</dependson>
          <blocked>25913</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>adele</cc>
    
    <cc>noel.gordon</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>121993</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-05-19 17:52:40 -0700</bug_when>
    <thetext>It&apos;s currently possible to drag a directory onto a &lt;input type=&quot;file&quot;&gt; control.  It&apos;s not possible to pick one from the file picker.

If we&apos;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&apos;t want to support dragging directories onto file controls, we need a good UI for when we prevent it (like showing the &quot;can&apos;t drop&quot; 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 &gt; 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 &quot;submit&quot; button manually).

I can break this into multiple bugs as needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121994</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-05-19 17:55:30 -0700</bug_when>
    <thetext>Three tests for directory dragging are being added in editing/pasteboard/file-input-files-access.html as part of bug 25852.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122265</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-05-21 00:32:57 -0700</bug_when>
    <thetext>Looks like the zipping behavior is intended!
https://bugs.webkit.org/show_bug.cgi?id=21115</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122269</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-05-21 00:46:44 -0700</bug_when>
    <thetext>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&apos;t handle them.  Or handle the directories properly if we accept the drag.  Anything else is confusing to the user.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122271</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-05-21 00:47:57 -0700</bug_when>
    <thetext>Changing title to &quot;WebKit should either handle directory uploads or refuse directory drags&quot;
currently we both accept the drag and fail the upload, see the above mentioned CFNetwork error message.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122273</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-05-21 00:49:58 -0700</bug_when>
    <thetext>Related https://bugs.webkit.org/show_bug.cgi?id=25913</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>