ZF-5370: Automatically set form encoding on upload
Description
When using the file element, the encoding of the form should automatically be set to 'multipart' to prevent unintentionally broken form uploads.
When using the file element, the encoding of the form should automatically be set to 'multipart' to prevent unintentionally broken form uploads.
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-12-29T05:17:18.000+0000
This will be difficult to accomplish, as the form object is not injected into individual elements. Additionally, we will not allow any code in Zend_Form that is specific to a given type of element.
Posted by Thomas Weidner (thomas) on 2008-12-29T07:51:49.000+0000
Matthew, I know this. This is just a reminder for me to see if there is a way.
You know that I will first ask you when there is a solution which is not strictly part of the file element before implementation.
Posted by Thomas Weidner (thomas) on 2009-02-03T00:50:34.000+0000
Under code review since 29.Jan.2009
Posted by Matthew Weier O'Phinney (matthew) on 2009-02-04T13:22:09.000+0000
Thomas -- I have a patch in the incubator that accomplishes this; it was an issue of order-of-operations. Tests for ZF-5370 now all pass; feel free to apply to trunk.
Posted by Thomas Weidner (thomas) on 2009-02-05T12:56:53.000+0000
Integrated with r13988