Skip to main content
Version: Fegg 5.x (next)

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​

NameData typeDefaultRemarks
$languageCodestringnullLanguage 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');