jansuchanek/nattachments
最新稳定版本:v1.1.0
Composer 安装命令:
composer require jansuchanek/nattachments
包简介
Universal file attachments component for Nette — upload, delete, reorder, rename, lightbox, PDF preview
README 文档
README
File attachment system for Nette Framework — upload, manage, and associate files with Doctrine entities.
Features
- 📎 File Uploads — Drag & drop with preview
- 🖼️ Image Thumbnails — Auto-generated previews
- 🔗 Entity Association — Link files to any Doctrine entity
- 🗑️ CRUD — Rename, reorder, delete with AJAX
- ⚙️ DI Extension — Auto-registers upload services
Installation
composer require jansuchanek/nattachments
Configuration
extensions: attachments: NAttachments\DI\NAttachmentsExtension attachments: uploadDir: %wwwDir%/uploads
Usage
In your presenter:
#[Inject] public AttachmentControlFactory $attachmentFactory; protected function createComponentAttachments(): AttachmentControl { return $this->attachmentFactory->create($this->entity); }
In your Latte template:
{control attachments}
Requirements
- PHP >= 8.2
- Nette Application ^3.2
- Doctrine ORM ^3.0
License
MIT
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-20