Ejemplo n.º 1
0
 protected function download(\Concrete\Core\File\File $file, $rcID = null)
 {
     $filename = $file->getFilename();
     $file->trackDownload($rcID);
     $fsl = $file->getFileStorageLocationObject();
     $configuration = $fsl->getConfigurationObject();
     $fv = $file->getVersion();
     if ($configuration->hasPublicURL()) {
         return \Redirect::url($fv->getURL())->send();
     } else {
         return $fv->forceDownload();
     }
 }