source: extensions/BatchDownloader/download.php @ 16731

Revision 16609, 740 bytes checked in by mistic100, 8 years ago (diff)

-add complete breadcrumb
-AJAX for remove photos (more faster)
-use try/catch for error handling

Line 
1<?php
2define('PHPWG_ROOT_PATH', '../../');
3include(PHPWG_ROOT_PATH.'include/common.inc.php');
4
5check_status(ACCESS_CLASSIC);
6
7try {
8  $BatchDownloader = new BatchDownloader($_GET['set_id']);
9  $file = $BatchDownloader->getArchivePath();
10
11  header('Content-Type: application/force-download; name="'.basename($file).'"');
12  header('Content-Disposition: attachment; filename="'.basename($file).'"');
13  header('Content-Description: File Transfer');
14  header('Content-Transfer-Encoding: binary');
15  header('Content-Length: '.filesize($file).'');
16
17  header('Cache-Control: no-cache, must-revalidate');
18  header('Pragma: no-cache');
19  header('Expires: 0');
20
21  readfile($file);
22}
23catch (Exception $e)
24{
25  echo $e->getMessage();
26}
27   
28exit(0);
29
30?>
Note: See TracBrowser for help on using the repository browser.