PHP code example of doublemcz / nette-plupload

1. Go to this page and download the library: Download doublemcz/nette-plupload 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/ */

    

doublemcz / nette-plupload example snippets


public function createComponentUploadForm($name)
{
	$form = new \Doublemcz\NettePlupload\Form($this, $name);
	$form->addPlupload('plupload');
	$form->addSubmit('submit', 'Send form');
	$form->onSuccess[] = [$this, 'onSuccess'];

	return $form;
}

public function onSuccess(Form $form)
{
	$files = $form->getValues()->plupload;
	foreach ($files as $file) {
	  // work with uploaded file
	}
}