application/libraries/MY_Upload.php
/**
	 * Init before upload
	 * Gives the user ability to change some preferences depending on his file
	 * Eg. directory
	 *
	 * Forbidden keys :
	 * - document_root
	 * - safe
	 *
	 * @param array $config
	 *
	 */
Init before upload
Gives the user ability to change some preferences depending on his file
Eg. directory

Forbidden keys :
- document_root
- safe

@param array $config
Init before upload Gives the user ability to change some preferences depending on his file Eg . directory Forbidden keys : - document_root - safe @param array $config
public function before_upload_initialization($config = array())
	{
		$forbidden = array(
			'document_root',
			'safe'
		);
		foreach ($config as $key => $val)
		{
			if (isset($this->{$key}) && ! in_array($key, $forbidden))
			{
				$this->$key = $config[$key];
			}
		}
	}
public function before_upload_initialization ( $ config = array ( ) ) { $ forbidden = array ( 'document_root' , 'safe' ) ; foreach ( $ config as $ key => $ val ) { if ( isset ( $ this -> { $ key } ) && ! in_array ( $ key , $ forbidden ) ) { $ this -> $ key = $ config [ $ key ] ; } } }
Init before upload
 Gives the user ability to change some preferences depending on his file
 Eg.
Init before upload Gives the user ability to change some preferences depending on his file Eg .
// Forbidden before upload config key // if (isset($this->{$key}) && ! in_array($key, $forbidden))