PHPackages                             mercator/wn-uploader-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mercator/wn-uploader-plugin

ActiveWinter-plugin

mercator/wn-uploader-plugin
===========================

Plugin providing frontend upload blocks for Winter CMS

00.90.00(7mo ago)052[1 issues](https://github.com/helmutkaufmann/wn-uploader-plugin/issues)MITPHP

Since Oct 11Pushed 4mo agoCompare

[ Source](https://github.com/helmutkaufmann/wn-uploader-plugin)[ Packagist](https://packagist.org/packages/mercator/wn-uploader-plugin)[ Docs](https://github.com/helmutkaufmann/wn-uploader-plugin)[ RSS](/packages/mercator-wn-uploader-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

Uploader Plugin for WinterCMS
=============================

[](#uploader-plugin-for-wintercms)

 [![Uploader Plugin](hero-uploader.png)](hero-uploader.png)

The **Uploader Plugin** extends WinterCMS with a backend-managed upload system and frontend components for user file submission.
Editors create so-called "Upload Forms" in the backend and optionally assign which users are allowed to upload to each form.
Frontend pages or blocks reference these backend-defined forms using their **Form ID**, and optionally include a **User ID** for controlled access.

---

⚙️ Overview
-----------

[](#️-overview)

This plugin provides:

- **Backend-defined upload forms** (with user access lists).
- A **frontend upload component** bound to a backend form.
- **QR code generators** linking directly to upload pages.
- **Email notifications** after successful uploads.
- Themed `.blocks` for **UIKit** and **Bootstrap** frontends.

All upload logic depends on backend definitions — no form can function until it has been created there.

---

📦 Installation
--------------

[](#-installation)

Install the plugin via Composer:

```
composer require mercator/wn-uploader-plugin
```

Then apply database migrations:

```
php artisan winter:up
```

---

🧠 Concept
---------

[](#-concept)

LayerDescription**Backend**Administrators create upload forms under **Uploader → Forms**, define allowed users (email, token, or ID), and optionally configure notification emails. Each form gets a unique **Form ID**.**Frontend**CMS components and blocks reference the **Form ID** to render upload interfaces or QR codes. The frontend can optionally specify a **User ID** to enforce access control.---

🧩 CMS Component: `Uploader`
---------------------------

[](#-cms-component-uploader)

### Purpose

[](#purpose)

Renders a frontend upload form connected to a backend-defined upload form. Files are stored in the media folder. Note that files are **NOT** automatically deleted when the Upload Form is deleted.

### Usage

[](#usage)

In your CMS page or layout:

```
[Uploader]
formId = "ajnjcdshu73nsd"
userId = "mdswedjndso734jdsi832j"
```

Then in the page markup:

```
{% component 'uploader' %}
```

### Parameters

[](#parameters)

PropertyTypeDescription`formId`stringThe **Form ID** of the backend-defined upload form. Required.`userId`stringOptional ID or email matching one of the users defined in the backend form.### Example Twig Rendering

[](#example-twig-rendering)

```

    {% component 'uploader' %}

```

If a form is missing or access is denied, the component displays:

> “Upload form not found or user not permissioned.”

---

🧱 Pre-defined Blocks
--------------------

[](#-pre-defined-blocks)

Located in `/blocks/`, these provide ready-made upload and QR-code functionality. Each block references the backend **Form ID** and automatically enforces form permissions.

BlockPurposeStyle`upload.block`Frontend uploader (UIKit)UIKit`upload_bootstrap.block`Frontend uploader (Bootstrap)Bootstrap`qrcode.block`QR code link to upload page (UIKit)UIKit`qrcode_bootstrap.block`QR code link to upload page (Bootstrap)Bootstrap---

🧮 Backend Usage
---------------

[](#-backend-usage)

### 1. Upload Forms

[](#1-upload-forms)

Go to **Uploader** in the backend.

Each **Upload Form** contained there defines:

- A unique **Form ID**
- **Title** and **Description** shown in frontend blocks and components
- **Allowed users**, identified by name, email, or ID
- **Upload constraints** (file size, extensions, ...)
- **Notification email settings**

Once created, the form can be referenced in frontend on CMS pages or using WinterCMS Blocks, both described above.

### 2. Access Control

[](#2-access-control)

User access can be defined **per upload form**. Each form specifies which users are authorized to upload.

Permission can be validated via:

```
uploaderUserIsPermissioned(form_id, user_id)
```

If the form does not exist or access is restricted and the user in not on the allowed list, the upload form is not displayed.

---

### 3. Email Notifications

[](#3-email-notifications)

Each upload form can optionally send email notifications to instruct them on file uplaoding and provide them with credentials. Notifications are sent to the **authorized user** defined in the form. The email will provide a link where the user will be able to upload his or her files.

---

### 4. Limitations for HEIF/HEIC

[](#4-limitations-for-heifheic)

HEIF/HEIC images can be uploaded provided heif/heic are specified as allowed file extensions in the backend. In this caase, resizing and editing wll not be available for these types. Note that browsers do not support thse image types. Thefore a conversion libray will be lazy-loaded when such images are uploaded. This library is rather large and might into your bandwidth.

---

🔐 Access Summary
----------------

[](#-access-summary)

ScenarioAllowedValid `formId` and permitted `userId`✅ Upload allowedValid `formId`, no `userId`, and `restricted` = false✅ Upload allowedValid `formId`, invalid `userId` and `restricted` = true❌ Upload deniedMissing or invalid `formId`❌ Upload deniedAll checks are enforced server-side.

---

🧰 Developer Notes
-----------------

[](#-developer-notes)

- Compatible with the dev instance of **WinterCMS 1.2.8** and **PHP 8.3**
- Uses `System\Models\File` for file storage
- Works with both **UIKit** and **Bootstrap**
- Helper functions:
    - `uploaderForm(form_id)`
    - `uploaderUserIsPermissioned(form_id, user_id)`
    - `uploaderQRCode(url, size, margin)`
    - `uploaderUploaderOpen(form_id [, user_id])` returns 0 when upload is authorized.

---

📄 License
---------

[](#-license)

MIT License. See [LICENSE](LICENSE) for details.

---

👤 Author
--------

[](#-author)

**Helmut Kaufmann**, Küssnacht am Rigi, Switzerland, [mercator.li](https://mercator.li)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance69

Regular maintenance activity

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

219d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d4325040b5bcb235cf0f7555ec5b28498935f54c74bb90c3b2828461598500d?d=identicon)[mercator](/maintainers/mercator)

---

Top Contributors

[![helmutkaufmann](https://avatars.githubusercontent.com/u/5102490?v=4)](https://github.com/helmutkaufmann "helmutkaufmann (5 commits)")[![damsfx](https://avatars.githubusercontent.com/u/282242?v=4)](https://github.com/damsfx "damsfx (1 commits)")

---

Tags

pluginuppyuploaderwinterwinter cms

### Embed Badge

![Health badge](/badges/mercator-wn-uploader-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/mercator-wn-uploader-plugin/health.svg)](https://phpackages.com/packages/mercator-wn-uploader-plugin)
```

###  Alternatives

[winter/wn-blog-plugin

Blog plugin for Winter CMS

2042.1k3](/packages/winter-wn-blog-plugin)[winter/wn-pages-plugin

Pages plugin for Winter CMS

1353.0k3](/packages/winter-wn-pages-plugin)[winter/wn-user-plugin

User plugin for Winter CMS

1233.5k13](/packages/winter-wn-user-plugin)[winter/wn-sitemap-plugin

Sitemap plugin for Winter CMS

1042.6k1](/packages/winter-wn-sitemap-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
