edownloadhelper Download a file with resume, stream and speed options

  1. ChangeLog
  2. Requirements
  3. Usage
  4. Resources

This extension is a helper for file downloads with resume, download speed and stream options.

**Tested only on Apache with DownthemAll FireFox plugin.

IMPORTANTAll helper extensions have been now moved to a more significant repository. Get the most up to date versions from it.

ChangeLog

  • 2011-01-29 Fixed "ob_flush(): failed to flush buffer. No buffer to flush." ( Rangel Reale)
  • 2011-01-25 Bugs Fixed -headers were not correctly printed

Requirements

Developed with Yii version 1.1.6

Usage

Download and extract the extension on your protected/extensions folder. The extension will be under a folder named 'helpers'.

The extension just have one static method and static property array that holds file extensions to be streamed. It use is quite straightforward:

NOTE: On the comments within the extension there is a DS reference that is a shortcut to DIRECTORY_SEPARATOR. Please, use as the following below:

// Import library ( assuming in protected.extensions.helpers)
Yii::import('ext.helpers.EDownloadHelper');

// assumming I have a folder named docs under my webroot folder
// and a file to be downloaded 'myhugefile.zip'
EDownloadHelper::download(Yii::getPathOfAlias('webroot.docs').DIRECTORY_SEPARATOR.'myhugefile.zip');

Resources

8 0
14 followers
1 397 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Tags: Download, File
Developed by: Antonio Ramirez
Created on: Jan 24, 2011
Last updated: 5 years ago

Downloads

show all

Related Extensions