nopj/flarum-ext-attachments

Flarum paid attachments extension with private backend-proxied downloads.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:flarum-extension

pkg:composer/nopj/flarum-ext-attachments

v0.1.1 2026-02-13 01:34 UTC

This package is auto-updated.

Last update: 2026-02-13 01:34:45 UTC


README

Paid/private attachments extension for Flarum.

Features

  • Upload files to S3/MinIO from backend (no secret exposed to frontend)
  • Private download flow (backend checks permission/purchase, then returns signed URL)
  • Attachment price and purchase status in forum UI
  • Supports flarum-ext-money balance deduction
  • Optional service fee, minimum price, minimum fee
  • Supports two resource types:
    • Upload file
    • External resource URL

Requirements

  • Flarum ^1.8
  • PHP ^8.1
  • antoinefr/flarum-ext-money ^1.3

Install (production)

Run in your Flarum root directory:

composer require nopj/flarum-ext-attachments
php flarum migrate
php flarum cache:clear

Then enable extension in Admin.

Install before Packagist release (from GitHub)

If package is not on Packagist yet, add VCS repository in Flarum root composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/chao2hang/flarum-ext-attachments"
    }
  ]
}

Then install:

composer require nopj/flarum-ext-attachments:dev-main
php flarum migrate
php flarum cache:clear

Admin settings

  • Storage: bucket, region, access key, secret key, endpoint, SSL verify, CA path, key prefix
  • Upload: max size, default price, upload permission group
  • Trade rules: fee enabled, fee amount, minimum fee, minimum price
  • Download signed URL expiration

Security notes

  • Keep ACL as private in production
  • Keep SSL verify enabled unless you know exactly why to disable
  • For custom CA, set ca_bundle_path

Release suggestion

Create tag so production can install stable version:

git tag v0.1.0
git push origin v0.1.0

Then users can install with:

composer require nopj/flarum-ext-attachments:^0.1

License

MIT