public function load($tmpFile, $folderPath = false)
    {
        // Validate filename
        $filename = $this->getValidFilename($tmpFile, $folderPath);
        if (!$filename) {
            return false;
        }

        // Save file into backend
        $result = $this->storeTempFile($tmpFile, $filename, $this->getAssetStore());

        //to allow extensions to e.g. create a version after an upload
        $this->extend('onAfterLoad', $result, $tmpFile);
        return $result;
    }
public function load($tmpFile, $folderPath = false)
    {
        // Validate filename
        $filename = $this->getValidFilename($tmpFile, $folderPath);
        if (!$filename) {
            return false;
        }

        // Save file into backend
        $result = $this->storeTempFile($tmpFile, $filename, $this->getAssetStore());

        //to allow extensions to e.g. create a version after an upload
        $this->extend('onAfterLoad', $result, $tmpFile);
        return $result;
    }
public function load ( $ tmpFile , $ folderPath = false ) { // Validate filename $ filename = $ this -> getValidFilename ( $ tmpFile , $ folderPath ) ; if ( ! $ filename ) { return false ; } // Save file into backend $ result = $ this -> storeTempFile ( $ tmpFile , $ filename , $ this -> getAssetStore ( ) ) ; //to allow extensions to e.g. create a version after an upload $ this -> extend ( 'onAfterLoad' , $ result , $ tmpFile ) ; return $ result ; }
Save an file passed from a form post into the AssetStore directly

@param array $tmpFile Indexed array that PHP generated for every file it uploads.
@param string|bool $folderPath Folder path relative to /assets
@return array|false Either the tuple array, or false if the file could not be saved
Save an file passed from a form post into the AssetStore directly