jansuchanek/nattachments

Universal file attachments component for Nette — upload, delete, reorder, rename, lightbox, PDF preview

Maintainers

Package info

github.com/JanSuchanek/nattachments

Language:Latte

pkg:composer/jansuchanek/nattachments

Statistics

Installs: 2

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.0 2026-03-20 14:34 UTC

This package is auto-updated.

Last update: 2026-04-20 15:26:23 UTC


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