Class Importer

Namespace: Concrete\Core\File
Located at src/File/Importer.php

Methods summary

public
public string
# getErrorMessage( integer $code )

Returns a text string explaining the error that was passed.

public
public string
# generatePrefix( )
public number
# import( string $pointer, string|boolean $filename = false, Concrete\Core\File\File|boolean $fr = false )

Imports a local file into the system. The file must be added to this path somehow. That's what happens in tools/files/importers/. If a $fr (FileRecord) object is passed, we assign the newly imported FileVersion object to that File. If not, we make a new filerecord.

public number
# importIncomingFile( string $filename, Concrete\Core\File\File|boolean $fr = false )

Imports a file in the default file storage location's incoming directory.

public

Constants summary

integer E_PHP_FILE_ERROR_DEFAULT

PHP error constants - these match those founds in $_FILES[$field]['error] if it exists.

# 0
integer E_PHP_FILE_EXCEEDS_UPLOAD_MAX_FILESIZE
# 1
integer E_PHP_FILE_EXCEEDS_HTML_MAX_FILE_SIZE
# 2
integer E_PHP_FILE_PARTIAL_UPLOAD
# 3
integer E_PHP_NO_FILE
# 4
integer E_FILE_INVALID_EXTENSION

concrete5 internal error constants.

# 10
integer E_FILE_INVALID
# 11
integer E_FILE_UNABLE_TO_STORE
# 12
integer E_FILE_INVALID_STORAGE_LOCATION
# 13
integer E_FILE_EXCEEDS_POST_MAX_FILE_SIZE
# 20

Properties summary

protected boolean $rescanThumbnailsOnImport
# true
protected array $importProcessors
# array()