Skip to content

Commit 4351104

Browse files
Update export actions to save files in a temporary directory for improved file management
1 parent 67565c8 commit 4351104

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Nova/Actions/ExportTemplateBos.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function handle(ActionFields $fields, Collection $models)
4545
'Template' => $sheetCollection,
4646
$model->sheet_name => Helper::makeCollectionForExportOnSheet($model->id, $model->tangal_spj, 2),
4747
]);
48-
(new FastExcel($sheets))->export(Storage::path('public/'.$filename));
48+
(new FastExcel($sheets))->export(Storage::path('public/.temp/'.$filename));
4949

5050
return Action::redirect(route('dump-download', [
5151
'filename' => $filename,

app/Nova/Actions/ExportTemplateCmsBri.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function handle(ActionFields $fields, Collection $models)
169169
$collection = $collection->merge($summary);
170170
}
171171
$filename = $fields->filename.'.csv';
172-
(new FastExcel($collection))->configureCsv(delimiter: '|', enclosure: chr(0))->export(Storage::path('public/'.$filename));
172+
(new FastExcel($collection))->configureCsv(delimiter: '|', enclosure: chr(0))->export(Storage::path('public/.temp/'.$filename));
173173

174174
return Action::redirect(route('dump-download', [
175175
'filename' => $filename,

0 commit comments

Comments
 (0)