Open Bug 1354503 Opened 7 years ago Updated 2 years ago

FF v53 having problem to get file list via user filesystem api

Categories

(Core :: DOM: Core & HTML, defect, P3)

53 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: gordon, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170323105023

Steps to reproduce:

Use resumeable.js or jquery file upload to drag & drop folder upload files.

All these JS library use FileSystem API


Actual results:

For example, my folder having 1500 files, but i can get 1300 files (file list via use filesystem api) only, the rest missing

If files is more than 100 or 800, will encountere files is not listed problem

Have tested under V52, working fine, all files is listed correctly


Expected results:

All files must be listed without missing
Component: Untriaged → DOM
May i know how to solve it?  Or just wait for new version?

I encountered this problem on V53 only, V52 and lower is working fine

I checked the codes, "item = item.getAsFile();", getAsFile() is return null
Flags: needinfo?(amarchesini)
Hi Simona,

I'm not able to reproduce this issue. What I have done is:

1. I created a folder with 1500 files called <number>.txt and each file contains 'hello world'.
2. a simple drop-zone with this code:

<div id="target" ondrop="drop(event);" ondragover="event.preventDefault();">Drop Zone</div>
<script>
function drop(ev) {
  ev.preventDefault();
  var reader = ev.dataTransfer.items[0].webkitGetAsEntry().createReader();
  reader.readEntries(function(a) {
    alert(a.length);
    for (var i = 0; i < a.length; ++i) console.log(a[i].name);
  });
}
</script>

It prints all the names and it shows 1500 in an alert window.

Can you please upload a testcase?
Note that you should call webkitGetAsEntry() in order to retrieve a FileSystemEntry object.
Flags: needinfo?(amarchesini) → needinfo?(simona.marcu)
Andrea, I wasn't able to reproduce the issue either. 

Gordon, could you please upload a test case? Please also try to reproduce your issue using the instructions from Comment 2.
Flags: needinfo?(simona.marcu) → needinfo?(gordon)
Hi,
  Can you try download these JS?  It is because i use the JS to try upload.

http://www.resumablejs.com/
https://github.com/blueimp/jQuery-File-Upload


  You can set some limit.  For example, .exe, .zip file can't be uploaded.  Also filter the file name, and control minimum upload size.

  Afterward, drag more than one folders or single folder (the folder has 1000 files and more than one sub-folders), these folders must contains some criterias can't be uploaded.

  I think the problem will come out.

  Regarding jquery-file-upload, you can use "owncloud" drag and drop upload files.  It is because owncloud also use it, and i have tried, same issues.

  Thank you.


Regards,

Gordon
Flags: needinfo?(gordon)
Flag on :baku for comment 4, thanks!
Flags: needinfo?(amarchesini)
I did some test and I uploaded 1 folder with these files:

/test/[000..999].jpg
/test/sub1/a[000..999].jpg
/test/sub2/b[000..999].jpg
in test, test/sub1 and test/sub2 there was also a foobar.txt

jquery-file-upload worked fine uploading 3000 files (and not 3003) excluding the 3 foobar.txt files (only JPG was allowed in my test). So everything worked as expected. Is this test similar to what you are describing?

Gordon, can you help me to debug this issue a bit more? I would like to know if the upload works for you if you don't set a size limit.
Flags: needinfo?(amarchesini) → needinfo?(gordon)
Priority: -- → P3
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.