/**
	 * Store the specified media at the specified path
	 * @param string $path The path of the file to retrieve
	 * @param MediaAsset $filedata The MediaAsset to store
	 * @return boolean True on success
	 **/
	public function silo_put( $path, $filedata )
	{
		$path = preg_replace('%\.{2,}%', '.', $path);
		$file = $this->root . '/' . $path;

		$result = $filedata->save( $file );
		if ( $result ) {
			$this->create_thumbnail( $file );
		}

		return $result;
	}
Пример #2
0
 /**
  * Store the specified media at the specified path
  * @param string $path The path of the file to retrieve
  * @param MediaAsset $filedata The MediaAsset to store
  * @return boolean True on success
  **/
 public function silo_put($path, $filedata)
 {
     $path = preg_replace('%\\.{2,}%', '.', $path);
     $file = $this->root . '/' . $path;
     return $filedata->save($file);
 }