blob: beb4fced02f7f3868c72d5a87edd99241f58e3ab [file] [log] [blame]
<?php
class DownloadFileController extends Controller {
public function __construct()
{
$this->beforeFilter('verifylogin');
$this->beforeFilter('verifyauthorizeduser');
}
public function downloadFile(){
if(Input::has("filePath") ){
$filePath = Input::get("filePath");
$file= Config::get('pga_config.airavata')["data-archive-path"] . "/" . Session::get("username") . "/" . $filePath;
$fileName = basename($file);
$headers = array(
'application/octet-stream',
);
return Response::download($file, $fileName, $headers);
}
}
}