PHPackages                             wanze/fieldtype-secure-file - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. wanze/fieldtype-secure-file

ActivePw-module[File &amp; Storage](/categories/file-storage)

wanze/fieldtype-secure-file
===========================

ProcessWire Fieldtype storing files in a customized location, for example outside the web-root.

8671[4 issues](https://github.com/wanze/FieldtypeSecureFile/issues)PHP

Since Mar 22Pushed 8y ago2 watchersCompare

[ Source](https://github.com/wanze/FieldtypeSecureFile)[ Packagist](https://packagist.org/packages/wanze/fieldtype-secure-file)[ RSS](/packages/wanze-fieldtype-secure-file/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (1)Used By (0)

FieldtypeSecureFile
===================

[](#fieldtypesecurefile)

A ProcessWire Fieldtype storing files in a customized location, outside the web root. This module is primarily useful if you need to store sensitive data which should not be accessible directly from the web. Normally, ProcessWire stores all files under `/site/assets/files`. Direct URL access to these files can be restriced by setting `$config->pagefileSecure = true`. Still you need to make sure that your template permissions are setup correctly.

Installation
------------

[](#installation)

Please take a look at the following guide:

Configuration
-------------

[](#configuration)

After installing this module, you can create a new field of type `SecureFile`. Enter your configuration under the "Details" section when editing the field:

- **Storage Location** Enter a path outside the web root where the files are stored. You need to create the directory manually. Also make sure that the user running the web server has write permission.
- **Roles allowing to download a secure file** Users with a role selected here are able to download the files if a download is requested via the API.
- **Allow Download in Admin** If checked, users having a role selected above can download the files when editing a page.

API
---

[](#api)

If you want to download a secure file, you can call `PagefileSecure::download()`. This method also makes sure that the current user is allowed to download the file, according to the permission configuration.

Example:

```
$secureFile = $page->secureFiles->first();
$secureFile->isDownloadable(); // Returns true if the current user is allowed to download
$secureFile->download(); // Performs the check above and delivers the file via the wireSendFile() function
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ea81f574ba589733a3fdf166487e2e50938572fc53e7292d968044de73fb3c8?d=identicon)[wanze](/maintainers/wanze)

---

Top Contributors

[![wanze](https://avatars.githubusercontent.com/u/2118742?v=4)](https://github.com/wanze "wanze (12 commits)")[![outflux3](https://avatars.githubusercontent.com/u/1743040?v=4)](https://github.com/outflux3 "outflux3 (1 commits)")

### Embed Badge

![Health badge](/badges/wanze-fieldtype-secure-file/health.svg)

```
[![Health](https://phpackages.com/badges/wanze-fieldtype-secure-file/health.svg)](https://phpackages.com/packages/wanze-fieldtype-secure-file)
```

###  Alternatives

[venveo/craft-compress

Create smart zip files from Craft assets on the fly

124.7k](/packages/venveo-craft-compress)

PHPackages © 2026

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