The purpose if for adding advanced facilities for add/edit of uploaded files.
Let's suppose we have a form for adding/editing a product. I am not talking about advanced upload facilities, as for http://www.swfupload.org/ but for some basic ones into a normal situation.
Case 1: We are a new product. The user is adding one file for upload, but forgets to fill other field.
The current way: The user gets again the add form, with all the valid values filled in, but of course, he lost the uploaded file, he should re-upload again the file...
Normal behavior: the uploaded field has a link to the uploaded file (or a thumbnail of the image, if that's an image). If the user wants to upload a different file then he just pick other file.
Case 2: We are editing a product.
The current way: the user is invited to upload new file without to actually see if there are currently uploaded files and which files
The new way: use is able to see what files are uploaded and to decide if he wants to add more.
Of course, the problem can be extended to be able to "remove" existing uploaded files.
I just tried to how you that if we are limiting the File element to a standard behavior is very difficult for developers to put up some otherwise not quite unusual facilities...
In my case, i had to rework lot of files to get such behavior (File Element, Decorator, aso)...
An error occurred in my problem description.
The Zend_Form_Decorator_File is not actually using the helper set on $helper on Zend_Form_Element_File and rather uses directly the helper formFile...