Upload::__construct
Create the uploader and load the error messages
Description
public Upload::__construct( [ string $languageCode = null ] )
Loads the error messages from file_error_message.php (see Configuration). The default settings are: no upload directory, a maximum file size of 2 MB, and the file types jpg, jpeg, png and gif.
Arguments
| Name | Data type | Default | Remarks |
|---|---|---|---|
| $languageCode | string | null | Language code / if set, config/{languageCode}/file_error_message.php is used |
Example
Controller
use Fegg\Tool\Upload;
$upload = new Upload();
// English error messages from config/en/file_error_message.php
$upload = new Upload('en');