Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/digilive/filestreamer
Library for streaming files inline or as (resumable) download to a client.
https://github.com/digilive/filestreamer
Last synced: about 1 month ago
JSON representation
Library for streaming files inline or as (resumable) download to a client.
- Host: GitHub
- URL: https://github.com/digilive/filestreamer
- Owner: DigiLive
- License: bsd-3-clause
- Created: 2022-02-17T12:29:56.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-02T20:39:38.000Z (over 2 years ago)
- Last Synced: 2024-11-18T07:59:38.179Z (about 2 months ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# fileStreamer
[![GitHub release](https://img.shields.io/github/v/release/DigiLive/fileStreamer?include_prereleases)](https://github.com/DigiLive/gitChangelog/releases)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](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
* 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
* PHP ^7.4
* ext-fileinfo *## Installation
The preferred method is to install the library
with [Composer](http://getcomposer.org).```sh
> 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
```php
setInline();
$fileStreamer->start();
// Execution of PHP will terminate when FileStreamer::start() is finished.
```