1. Go to this page and download the library: Download ondrs/upload-manager library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ondrs / upload-manager example snippets
/** @var \ondrs\UploadManager\Upload @inject
public $upload;
public function renderUpload()
{
$this->upload->filesToDir('path/to/dir');
}
public function processForm($form)
{
/** @var Nette\Http\FileUpload */
$fileUpload = $form->values->file;
$this->upload->singleFileToDir('path/to/dir', $fileUpload);
}