rndoom04 / downloader
PHP simple file downloader - send file to download.
v1.1
2026-05-11 21:16 UTC
Requires
- php: >=8.2
- skyzyx/mimetypes: ~1.1.1
This package is not auto-updated.
Last update: 2026-05-11 21:18:41 UTC
README
A lightweight, robust PHP library for sending files to the browser as a download. It handles MIME types, output buffering, and memory management for you.
Features
- Automatic MIME Type Detection: Uses the
skyzyx/mimetypescomponent to correctly identify file types. - Buffer Management: Automatically clears all output buffers and disables compression to prevent corrupted binary downloads.
- Resource Efficient: Uses file pointers and streams, making it suitable for serving large files without hitting memory limits.
- Flexible Sources: Create downloads from existing files or directly from raw strings (e.g., dynamic CSV/logs).
Installation
Install the package via Composer:
composer require rndoom04/downloader