$writer = new Xlsx($excel);
$writer->save($tmpfile);
- $url = route('download_settings', ['file' => base64_encode($tmpfile)]);
+ $hash = explode('cubist',$tmpfile)[1];
+
+ $url = route('download_settings', ['file' => base64_encode($hash)]);
$subject = __("Export groupé des paramètres des fluidbooks prêt au téléchargement");
$notification = '';
$action = [
protected function downloadSettings($file) {
$name = "settings_export";
- $path = base64_decode($file);
+ $path = "/tmp/cubist".base64_decode($file);
if(!file_exists($path)) abort(404);
return response()->download($path, $name . '.xlsx');
}