Ejemplo n.º 1
0
use yii\helpers\VarDumper;
echo 'post';
//VarDumper::dump($_POST, 10, true);
echo 'files';
//VarDumper::dump($_FILES, 10, true);
//VarDumper::dump(Yii::$app->hydra->ls('/'), 10, true);
//VarDumper::dump(Yii::$app->hydra->ls('/dir'), 10, true);
//VarDumper::dump(Yii::$app->hydra->clearFileCache('/vlcsnap-2015-07-19-20h40m51s369.png'), 10, true);
//VarDumper::dump(Yii::$app->hydra->getFileInfo('/vlcsnap-2015-07-19-20h40m51s369.png'), 10, true);
//VarDumper::dump(Yii::$app->hydra->deleteFile('/dir/file2.jpg'), 10, true);
//VarDumper::dump(Yii::$app->hydra->deleteFile('/vlcsnap-2015-07-19-20h40m51s369.png'), 10, true);
//<?= Html::fileInput('file')
?>
?>
<h1><?php 
echo $name;
?>
</h1>
<?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>


<?php 
echo \zabachok\hydra\widgets\FileInput::widget(['name' => 'file']);
?>

    <button>Submit</button>

<?php 
ActiveForm::end();
Ejemplo n.º 2
0
<?php 
use zabachok\hydra\widgets\FileInput;
use zabachok\hydra\Assets;
Assets::register($this);
$this->registerJs("hydra.facade.init();");
echo FileInput::widget(['name' => 'mediafile']);
//return;
?>
<div class="container-fluid">
    <div class="row">
        <div class="col-md-8">
            <ol class="breadcrumb" id="hydra-breadcrumbs">
                <li>Корень</li>
            </ol>
        </div>
        <div class="col-md-4">
            <div class="input-group">
                <input type="search" class="form-control" placeholder="Поиск в этой папке">
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-search"></span>
                    <span class="glyphicon glyphicon-remove" style="cursor: pointer;"></span>
                </span>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-5">
            <div class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-folder-close"></span> Создать папку</div>