3 declare(strict_types=1);
32 $this->
logger = $DIC->logger()->cal();
78 $zip_name = $input[1];
79 $download_name = $input[0];
81 $this->
logger->debug(
'User interaction download zip ' . $input[0]->
getValue() .
' as ' 84 if ($user_selected_option->
getValue() != self::OPTION_DOWNLOAD) {
85 $this->
logger->info(
'Download canceled');
87 $filesystem = $DIC->filesystem()->temp();
90 $path = LegacyPathHelper::createRelativePath($zip_name->getValue());
94 if (!is_null(
$path) && $filesystem->has(
$path)) {
95 $filesystem->deleteDir(dirname(
$path));
99 return $download_name;
102 $this->
logger->info(
"Delivering File.");
105 $download_name->getValue(),
106 $zip_name->getValue(),
107 MimeType::APPLICATION__ZIP
111 return $download_name;
interaction(array $input, Option $user_selected_option, Bucket $bucket)
getInputTypes()
Type[] A list of types that are taken as input.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static deliverFileAttached(string $path_to_file, ?string $download_file_name=null, ?string $mime_type=null, bool $delete_file=false)
Description of class class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...