<?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>37957</bug_id>
          
          <creation_ts>2010-04-21 15:31:41 -0700</creation_ts>
          <short_desc>file API doesn&apos;t support multiple files</short_desc>
          <delta_ts>2011-01-23 00:29:46 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://www.thecssninja.com/demo/gmail_upload/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Paul Irish">paulirish</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jayarjo</cc>
    
    <cc>paulirish</cc>
    
    <cc>robert</cc>
    
    <cc>scottt.tw</cc>
    
    <cc>seddon.ryan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>215541</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Irish">paulirish</who>
    <bug_when>2010-04-21 15:31:41 -0700</bug_when>
    <thetext>This issue with multiple files with the file API and drag and drop is described here:
http://www.thecssninja.com/javascript/gmail-upload

&quot;Dropping multiple files will populate the files array in the file input, but selecting say 3 files and dragging them into Safari will register 3 files have been dragged but if you iterate over the files array those 3 files will all be the same file...

&quot;To explain it better let’s say you have 3 files each one called a.jpg, b.jpg and c.jpg selecting those 3 files and then clicking and dragging on the b.jpg file will add 3 files to the input. The file you did the drag operation on will be added 3 times to the input and it will ignore the other files, iterating over the files array will have b.jpg 3 times?!&quot;


This can be used as a demo page:
http://www.thecssninja.com/demo/gmail_upload/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294665</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Nyman">robert</who>
    <bug_when>2010-10-15 02:57:16 -0700</bug_when>
    <thetext>It seems to support multiple files in the sense that it can read out the information about them (which can be seen at http://robertnyman.com/html5/fileapi/fileapi.html). At a first look, it rather looks like the problem is that there&apos;s no support for FileReader.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295290</commentid>
    <comment_count>2</comment_count>
    <who name="Ryan">seddon.ryan</who>
    <bug_when>2010-10-17 15:41:17 -0700</bug_when>
    <thetext>That&apos;s my demo, safari doesn&apos;t support FileReader, yet. This bug isn&apos;t to do with the File API either. Dragging multiple files onto a file input in Safari will only reference the file dragged. The count will be correct if I drag 5 files but those 5 files will be all the same.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295381</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Nyman">robert</who>
    <bug_when>2010-10-18 00:42:55 -0700</bug_when>
    <thetext>Right, but in my demo that I provided, when you drag multiple files into the file input in Safari, it doesn&apos;t seem to reference just he same file, but can read out name, size etc for each respective file that was dragged.

For uploading, though, I haven&apos;t tested it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295785</commentid>
    <comment_count>4</comment_count>
    <who name="Ryan">seddon.ryan</who>
    <bug_when>2010-10-18 15:21:58 -0700</bug_when>
    <thetext>Safari 5 on windows will not work correctly when dragging multiple files into a file input. I recorded a quick screencast showing what happens http://screenr.com/c1D 

When I drag multiple files it will get the count of the files right but the file actually dragged with the cursor will be the file to have it&apos;s information repeated nth times.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>296034</commentid>
    <comment_count>5</comment_count>
    <who name="Robert Nyman">robert</who>
    <bug_when>2010-10-19 00:50:02 -0700</bug_when>
    <thetext>Ah, I see - have only tested on Mac OS X.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>338677</commentid>
    <comment_count>6</comment_count>
    <who name="Davit Barbakadze">jayarjo</who>
    <bug_when>2011-01-23 00:29:46 -0800</bug_when>
    <thetext>Any update on this? 

As stated it seems to affect only Windows version of Safari, which makes whole &quot;put-file-input-in-front-of-dragged-file-to-fake-real-drag-and-drop&quot; trick pointless, as Safari on Mac seems to support this feature without any tricks (not sure since when though).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>