FileAPI doesn't update the files size when user makes file changes




5 years ago
5 years ago


(Reporter: trevor.m.senior, Unassigned)


(Depends on: 1 bug)

12 Branch

Firefox Tracking Flags

(Not tracked)




5 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19

Steps to reproduce:

I chose a file using the HTML5 FileAPI.

See this question I posted here:

And The relating JSFiddle:

JSFiddle Usage:

1. Load in a text file from your local machine.
2. Hit "load file".
3. Hit "display file size" - note the size.
4. modify & save the text file on your local machine.
5. Hit "display file size" again. Note how in webkit browsers (Chrome) the file size changes, but in   Firefox it didn't update the file size

Actual results:

After choosing the file, I displayed its file size. I then modified the file on the local machine, but when reading the file again the file size remains the same. 

Expected results:

Webkit browsers (Google Chrome) update the size of a file when users make changes to files locally, whereas this version of Firefox did not! This should be fixed to ensure that the file is the correct size on the client side, even if the user makes changes to their file.


5 years ago
Component: Untriaged → File Handling
QA Contact: untriaged → file.handling


5 years ago
OS: Windows 7 → All
Component: File Handling → DOM
Product: Firefox → Core
Oh, I'd love to see (or even work on a fix for) this.  As I understand it, this would be done by asking the operating system to notify when a file changes. Mozilla's nsLocalFile*.cpp code has no code to support this as far as I know.
(In reply to Alex Vincent [:WeirdAl] from comment #1)
> Mozilla's nsLocalFile*.cpp code has no code to support this as far
> as I know.

Bug 759416 is adding that.
Depends on: 759416
You need to log in before you can comment on or make changes to this bug.