Req #19247 [Opn->WFx]: HTML_QuickForm2_Element_InputFile

From: Date: Fri, 24 Feb 2012 10:19:22 +0000
Subject: Req #19247 [Opn->WFx]: HTML_QuickForm2_Element_InputFile
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8316@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19247&edit=1 ID: 19247 Updated by: borz_off@cs.msu.su Reported By: rico dot sonntag at netresearch dot de Summary: HTML_QuickForm2_Element_InputFile -Status: Open +Status: Wont fix Type: Feature/Change Request Package: HTML_QuickForm2 Package Version: 0.6.1 PHP Version: 5.3.9 Roadmap Versions: New Comment: -Status: Open +Status: Wont fix There already is a mimetype rule. Enabling it is a matter of if ($file->getAttribute('accept')) { $file->addRule('mimetype', 'A specific error message', array_map('trim', explode(',', $file->getAttribute('accept')))); } This *can* be done automatically, but then we'll have to add a generic error message to default MessageProvider. This error message will be far less useful to end-user than a specific error message ('File type does not match "accept" attribute' vs. 'A text file is expected'), IMO. Previous Comments: ------------------------------------------------------------------------ [2012-01-25 10:44:05] ricson Description: ------------ It would be nice if HTML_QuickForm2_Element_InputFile would also validate the uploaded files against the "accept"-attribute if it is configured and throw an error if the mime type didn't match. ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19247&edit=1

« previous php.pear.bugs (#8316) next »