Download the PHP package jkuchar/filedownloader without Composer
On this page you can find all versions of the php package jkuchar/filedownloader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jkuchar/filedownloader
More information about jkuchar/filedownloader
Files in jkuchar/filedownloader
Package filedownloader
Short Description Addon makes controlled downloads of files peace of cake. It supports client reconnections, segmented downloading, files over 4GB, automatic mime-type detection and special characters in file names. If you need to control download speed you are on the right site.
License New BSD License
Informations about the package filedownloader
File Downloader
looking for new maintainer(s) Please use Nette\Application\Responses\FileResponse instead. Or hi-speed solution X-Accel/NGINX or X-Sendfile/Apache.
Addon makes controlled downloads of files peace of cake. It supports client reconnections, segmented downloading, files over 4GB, automatic mime-type detection and special characters in file names. If you need to control download speed you are on the right site.
- License: New BSD License
- Discussion
- Demo
Installation
Install this addon just by calling:
composer require jkuchar/filedownloader
Or to install example, continue to example repository. (one command set-up)
Basic usage: Just want to download file
Import FileDownloader from it's namespace
And use
Advanced usage: combination of advanced features
The same thing using fluent-interface:
Callbacks
When... ...download is cancelled ...download failed ...download succeded etc.
Callback name | Description |
---|---|
BeforeDownloaderStarts | Before downloader starts |
BeforeOutputStarts | Before output to browser starts (last chance to modify HTTP headers) |
StatusChange | When file download status changes (when block of file is sent or every second if there is no speed limit) |
Complete | When file download is finished |
Abort | When file download is aborted (user clicks cancel) |
ConnectionLost | When connection is lost (for whatever reason) |
TransferContinue | When paused transfer continues (this is start event for partial downloads) |
NewTransferStart | When new transfer from beginning starts (this is start event for downloads from beginning) |
In repository there is example form that prints on screen all called callbacks.
Technical requirements
There are two downloaders AdvancedDownloader requires to set infinite time limit (tries to do so automatically). As fallback there is NativePHPDownloader available, this downloader requires as much memory as is file size on some PHP installtions. (php bug: if you've found solution, please let me know)
Callbacks, speed controlling and support for big files is only for AdvancedFileDownloader!
Support for huge files (over 4 GB)
- This is realized through cURL extension so please do not forget to enable it. Addon will work also without CURL but very inefficiently.
- Support for >4GB files also requires to add BigFileTools into your libraries (do that using composer)
All versions of filedownloader with dependencies
nette/application Version ~2.4
nette/deprecated Version ^2.4
jkuchar/bigfiletools Version >=1.1.0 <=2.0