PHPackages                             digilive/file-streamer - 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. digilive/file-streamer

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

digilive/file-streamer
======================

Stream a file or serve a file as (resumeable) download

v1.0.0(3y ago)012BSD-3-ClausePHPPHP &gt;=7.4

Since Oct 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/DigiLive/fileStreamer)[ Packagist](https://packagist.org/packages/digilive/file-streamer)[ RSS](/packages/digilive-file-streamer/feed)WikiDiscussions main Synced 1mo ago

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

fileStreamer
============

[](#filestreamer)

[![GitHub release](https://camo.githubusercontent.com/23cd21d4a266b1e4a1e32cdc96df2ee5ef7fea5b140d64c5b0861f10d7749251/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f446967694c6976652f66696c6553747265616d65723f696e636c7564655f70726572656c6561736573)](https://github.com/DigiLive/gitChangelog/releases)[![License](https://camo.githubusercontent.com/b3775a2de17853a90995faa104f941eef3ad3c40cc89e34b8b1eaea014614d4e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d425344253230332d2d436c617573652d626c75652e737667)](https://opensource.org/licenses/BSD-3-Clause)

This library serves a file according to the headers which are sent with a http request. It supports resumable downloads or streaming the content of a file to a client.

If you have any questions, comments or ideas concerning this library, please consult the code documentation at first. Create a new [issue](https://github.com/DigiLive/fileStreamer/issues/new) if your concerns remain unanswered.

Features
--------

[](#features)

- Inline disposition.
- Attachment disposition.
- Serve a complete file.
- Serve a single byte range of a file.
- Serve multiple byte ranges of a file.
- Set a custom mimetype.

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

[](#requirements)

- PHP ^7.4
- ext-fileinfo \*

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

[](#installation)

The preferred method is to install the library with [Composer](http://getcomposer.org).

```
> composer require digilive/file-streamer:^1
```

Set the version constraint to a value which suits you best.
Alternatively you can download the latest release from [GitHub](https://github.com/DigiLive/fileStreamer/releases).

Example use
-----------

[](#example-use)

```
