flame / fileuploader-component
Simple Nette component for uploading files via AJAX.
dev-master
2013-01-20 11:14 UTC
Requires
- php: >=5.3.2
- flame/framework: @dev
- nette/nette: @dev
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
- Flame framework
- Twitter Bootstrap (recommend submodule)
###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}