efilecloaker Cloak your files link from end users.

  1. Requirements
  2. Usage

This extension is a simple implementation to cloak your original location of files to be downloaded. That way, no direct links to your file will be available to visitors.


  • Yii 1.1.6 or above
  • mod_xsendfile (optional) to allow download of large files with ease


How to use:

  • Download and extract EFileCloaker in your extension directory.
  • Modify your configuration file to auto import the extension folder example:
  • Call the widget with parameters: (1) OriginalFileName as displayed name; (2) OriginalUrl as direct link to file. Example:
       $this->widget('application.extensions.EFileCloaker', array(
           'OriginalFileName'=>'Demo File',
  • Create an action to download files. Example:
	public function actionDownload()
		$uncloak = new EFileCloaker();
		// To get original Url for further processing
		// $originalUrl = $uncloak->getOriginalUrl();
		// Downloads the file indicated by the $_GET key
		// Or downloads the file while specifiying
		// some actions before actual downloads happens
		// with a callback function
		// $uncloak->download(function($key, $originalUrl) { 
		// 	die($key . $originalUrl); 
		// });
  • Done
4 2
1 094 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: File System
Developed by: Blue Spy
Created on: Oct 26, 2011
Last updated: 11 years ago


show all