Skip to content

rauwebieten/psr7-partial-download

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSR-7 Partial download

Partial downloads with PSR-7 libraries.

  • Resuming downloads
  • Audio streaming

Based on code by pomle https://github.com/pomle/php-serveFilePartial

Installation

composer require rauwebieten/psr7-partial-download

Usage

// in your controller class / callback

$partialDownload = new Psr7PartialDownload();
$response = $partialDownload->sendFile($request,$response,'my-song.mp3','audio/mpeg');
return $response;

see the example folder for details