MDL-58334 repositories: Offline downloads
Support an optional param for offline downloads for repositories supporting external links (googledrive and skydrive). Part of MDL-58220
This commit is contained in:
+4
-1
@@ -33,5 +33,8 @@ require_once('lib/filelib.php');
|
||||
$relativepath = get_file_argument();
|
||||
$forcedownload = optional_param('forcedownload', 0, PARAM_BOOL);
|
||||
$preview = optional_param('preview', null, PARAM_ALPHANUM);
|
||||
// Offline means download the file from the repository and serve it, even if it was an external link.
|
||||
// The repository may have to export the file to an offline format.
|
||||
$offline = optional_param('offline', 0, PARAM_BOOL);
|
||||
|
||||
file_pluginfile($relativepath, $forcedownload, $preview);
|
||||
file_pluginfile($relativepath, $forcedownload, $preview, $offline);
|
||||
|
||||
Reference in New Issue
Block a user