Re: HTML_QuickForm: two new functions (file uploads)
| From: | Radek Maciaszek | Date: | Tue, 25 Feb 2003 19:03:45 +0000 |
| Subject: | Re: HTML_QuickForm: two new functions (file uploads) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13892@lists.php.net to get a copy of this message | ||
Wojciech Gdela wrote:
Hello, I would like to see two simply but usefull (at least for me) functions in QuickForm.php: // {{{ isUploadedFile() /** * Checks if the given element contains an uploaded file *Hi Wojtek! I think it is good idea. I don't noticed any function (or i'm blind?) to check if file is uploaded (_rule is private method) and also getUploadedFile should be useful for me. Simple and fast solution :) From me +1. Best Regards, Radek* @param string $element Element name * @since 2.9 * @access public * @return bool true if file has been uploaded, false otherwise * @throws */function isUploadedFile($element) {return $this->_ruleIsUploadedFile($element);} // end func isUploadedFile // }}} // {{{ getUploadedFile() /** * Returns temporary filename of uploaded file* @param string $element * @since 2.9* @access public */ function getUploadedFile($element) {$file = $this->_submitFiles[$element]; return $file['tmp_name'];} // end func getUploadedFile // }}} This functions are usefull when I don't need to move the uploaded file, and I only want to read it's content. What do you think? Should I produce diffs and send to developers?