dpsoft/psr7partial-download

There is no license information available for the latest version (v1.1) of this package.

Partial file download based on PSR-7

v1.1 2018-03-12 15:58 UTC

This package is auto-updated.

Last update: 2024-10-16 03:12:07 UTC


README

License: GPL v2

PSR-7 Partial file download package based on HTTP 206 Partial Content In Node.js

Install

Install latest version using composer.

$ composer require dpsoft/psr7partial-download

Usage

/** @var Psr\Http\Message\ServerRequestInterface */
$request = ;
/** @var Psr\Http\Message\ResponseInterface */
$response = ;
 $serve = new Dpsoft\psr7PartialDownload\Serve($request,$response);
 
 /** @var Psr\Http\Message\ResponseInterface */
 $response = $serve->download($filePath,$fileName);

Test

with 93% code coverage!