Re: Adding files to an input's FileList

On Jun 25, 2014, at 2:55 AM, Drew DeVault <drew@mediacru.sh> wrote:

>  // a is a File
>    input.files.append(a); // Should work
>    input.files.append('/etc/passwd'); // Should not work



Given that FormData has an append(), what use case do you have in mind that wants an append() to a FileList?

FWIW, there’s a few separate issues with FileList:

1. There’s the idea that it should go away altogether as a standalone object, and be replaced with an Array:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24586

I think this is pretty likely, once underlying issues with WebIDL are nailed down.

2. There’s the inability to programmatically fix a selection error:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17125

I think we get this “out of the box” if we move towards an Array model with FileList.

But I’m still curious what use case you want to address. FormData solves the idea of mixing application-generated files with user-selected ones for server submission. What’s gained with this proposal? 

— A*

Received on Monday, 30 June 2014 21:01:40 UTC