| Current Path : /var/www/components/com_yendifvideoshare/controllers/ |
| Current File : /var/www/components/com_yendifvideoshare/controllers/upload.php |
<?php
/**
* @version 1.2.9
* @package Com_YendifVideoShare
* @author PluginsWare Interactive Pvt. Ltd <admin@yendifplayer.com>
* @copyright Copyright (c) 2012 - 2021 PluginsWare Interactive Pvt. Ltd. All Rights Reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// Prevent direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class YendifVideoShareControllerUpload extends YendifVideoShareController {
public function upload() {
$app = JFactory::getApplication();
$id = $app->input->getInt( 'id' );
$field = $app->input->get( 'f' );
$folder = 'videos' . DIRECTORY_SEPARATOR . $id;
jimport( 'joomla.filesystem.folder' );
if ( ! JFolder::exists( YENDIF_VIDEO_SHARE_UPLOAD_BASE . $folder ) ) JFolder::create( YENDIF_VIDEO_SHARE_UPLOAD_BASE . $folder );
$uploader = YendifVideoShareUpload::getInstance();
$file = $uploader->doUpload( 'upload_' . $field, $folder );
echo $file;
exit();
}
}