Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.04 KB

README.md

File metadata and controls

46 lines (35 loc) · 1.04 KB

FileUploader-Component

Simple Nette component for uploading files via AJAX

###Requires

###Usage config.neon

services:
	FileUploaderForm: \Flame\Components\FileUploader\FileUploaderFormFactory
	FileUploaderControl: \Flame\Components\FileUploader\FileUploaderControlFactory

Presenter

	/**
	 * @var \Flame\Components\FileUploader\FileUploaderControlFactory $fileUploader
	 */
	private $fileUploader;

	/**
	 * @param \Flame\Components\FileUploader\FileUploaderControlFactory $fileUploader
	 */
	public function injectFileUploader(\Flame\Components\FileUploader\FileUploaderControlFactory $fileUploader)
	{
		$this->fileUploader = $fileUploader;
	}

	...

	/**
	 * @return \Flame\Components\FileUploader\FileUploaderControl
	 */
	protected function createComponentFileUploader()
	{
		return $this->fileUploader->create();
	}

Template

{control fileUploader}