flame/fileuploader-component

Simple Nette component for uploading files via AJAX.

dev-master 2013-01-20 11:14 UTC

This package is not auto-updated.

Last update: 2024-12-21 13:31:30 UTC


README

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}