Upload helper class for working with the global $_FILES array and Validation library.
This is the code documentation for the SproutCMS project
Search documentation |
class UploadThis class is deprecated This is old Kohana cruft Upload helper class for working with the global $_FILES array and Validation library.
Functions
public requiredbool Upload::required ( array $file ); Tests if input data has valid upload data. public savestring Upload::save ( mixed $file [, string $filename [, string $directory [, integer $chmod ]]] ); Save an uploaded file to a new location. public sizebool Upload::size ( array $file , array $size ); Validation rule to test if an uploaded file is allowed by file size. File sizes are defined as: SB, where S is the size (1, 15, 300, etc) and B is the byte modifier: (B)ytes, (K)ilobytes, (M)egabytes, (G)igabytes. Eg: to limit the size to 1MB or less, you would use "1M". public typebool Upload::type ( array $file , array $allowed_types ); Validation rule to test if an uploaded file is allowed by extension. public validbool Upload::valid ( array $file ); Tests if input data is valid file type, even if no upload is present. |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |