PHPackages                             xy2z/file-render - 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. xy2z/file-render

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

xy2z/file-render
================

Renders file in the browser from a non-public dir.

1.0.1(8y ago)021[1 PRs](https://github.com/xy2z/FileRender/pulls)MITPHPPHP &gt;=7.0

Since Dec 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/xy2z/FileRender)[ Packagist](https://packagist.org/packages/xy2z/file-render)[ RSS](/packages/xy2z-file-render/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (4)Used By (0)

FileRender
==========

[](#filerender)

Presents a file in the browser from a non-public dir.

The file will be downloaded if not presentable (eg. `.dll`, `.exe` etc.)

Requirements
------------

[](#requirements)

- PHP 7.0 or above
- `php_exif` extension enabled (included in PHP)

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

[](#installation)

Install the latest version with [Composer](https://getcomposer.org).

```
$ composer require xy2z/file-render
```

Basic Usage
-----------

[](#basic-usage)

```
use xy2z\FileRender\FileRender;

$fr = new FileRender('/path/to/file.png');
$fr->render();
```

### Force Download

[](#force-download)

```
$fr = new FileRender('/path/to/file.png');
$fr->force_download = true;
$fr->download_filename = 'renamed.png';
$fr->render();
```

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Every ~2 days

Total

2

Last Release

3162d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d4c08a97e1c9c53efb123c306f551fcb367e8adea3bfa1412c49c8e5133aeff?d=identicon)[xy2z](/maintainers/xy2z)

---

Top Contributors

[![xy2z](https://avatars.githubusercontent.com/u/4496997?v=4)](https://github.com/xy2z "xy2z (4 commits)")

---

Tags

filerender

### Embed Badge

![Health badge](/badges/xy2z-file-render/health.svg)

```
[![Health](https://phpackages.com/badges/xy2z-file-render/health.svg)](https://phpackages.com/packages/xy2z-file-render)
```

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k694.3M2.7k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k293.8M1.1k](/packages/league-flysystem-aws-s3-v3)[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k42.1M138](/packages/knplabs-gaufrette)[knplabs/knp-gaufrette-bundle

Allows to easily use the Gaufrette library in a Symfony project

72430.5M109](/packages/knplabs-knp-gaufrette-bundle)[league/flysystem-local

Local filesystem adapter for Flysystem.

228280.2M109](/packages/league-flysystem-local)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8838.8M318](/packages/league-flysystem-memory)

PHPackages © 2026

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