symfony2admingenerator / AvocodeFormExtensionsBundle

(old-legacy) Symfony2 form extensions for Admingenerator project (also working standalone!)
Other
48 stars 31 forks source link

Why was the cancel button removed from synchronous mode of collection upload? #100

Closed Restless-ET closed 10 years ago

Restless-ET commented 10 years ago

I can see that the cancel button has been set to hidden on collection upload synchronous mode.

The change was applied here: https://github.com/avocode/FormExtensions/commit/5321e108b597b5ffe20e486bd7f36e907bfd0361#diff-847820bdef45c1a667fc21c60b381d66

I'd just like to understand the reason for doing this because it's kind of a bother to remove all files selected in case one is added by mistake together with the wanted files. Wouldn't it be more useful to able to remove that unwanted file from the list of files to upload?

sescandell commented 10 years ago

Hi @Restless-ET ,

Because of how HTML5 input file is working with multiple attribute set to true. In fact, we can't remove only one file from selected files on a multiple input file. So I removed this button. If I let the button, the row will effectively removed from the table presentation, but the input file will still contain the file in its "ready to upload file list". And I can't change this list.

(Have a look here: http://www.w3.org/TR/html-markup/input.file.html and search for the attribute FileList. You'll see this is a readonly attribute).

Restless-ET commented 10 years ago

Humm.. Ok, I understand it now. Thank you for the explanation. :)