Skip to content

Commit 785875e

Browse files
committed
Merge branch 'main' of https://github.com/laravelwebdev/simpede into main
2 parents 180d35f + 0e0ab3a commit 785875e

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

app/Helpers/Cetak.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static function cetak($jenis, $models, $filename, $template_id, $tanggal
5959

6060
$mainTemplate->settempDocumentMainPart($mainXml);
6161
$filename .= '_'.uniqid().'.docx';
62-
$mainTemplate->saveAs(Storage::disk('public')->path(config('app.download_temp').'/'.$filename));
62+
$mainTemplate->saveAs(Storage::disk('temp')->path($filename));
6363

6464
return $filename;
6565
}

app/Http/Controllers/DumpDownloadController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ class DumpDownloadController extends Controller
88
{
99
public function __invoke(string $filename)
1010
{
11-
$path = Storage::disk('public')->path(config('app.download_temp').'/'.$filename);
11+
$path = Storage::disk('temp')->path($filename);
1212

13-
if (! Storage::disk('public')->path(config('app.download_temp').'/'.$filename)) {
13+
if (! Storage::disk('temp')->path($filename)) {
1414
abort(404, 'File not found.');
1515
}
1616

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::disk('public')->path(config('app.download_temp').'/'.$filename));
48+
(new FastExcel($sheets))->export(Storage::disk('temp')->path($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::disk('public')->path(config('app.download_temp').'/'.$filename));
172+
(new FastExcel($collection))->configureCsv(delimiter: '|', enclosure: chr(0))->export(Storage::disk('temp')->path($filename));
173173

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

config/app.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,4 @@
164164
'sentry_project' => env('SENTRY_PROJECT_ID'),
165165
'sentry_token' => env('SENTRY_AUTH_TOKEN'),
166166

167-
/*
168-
|--------------------------------------------------------------------------
169-
| Download Temporary Folder
170-
|--------------------------------------------------------------------------
171-
|
172-
*/
173-
174-
'download_temp' => '.temp',
175-
176167
];

config/filesystems.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@
116116
'throw' => false,
117117
],
118118

119+
'temp' => [
120+
'driver' => 'local',
121+
'root' => storage_path('app/public/.temp'),
122+
'url' => env('APP_URL').'/storage/.temp',
123+
'visibility' => 'public',
124+
'throw' => false,
125+
],
126+
119127
's3' => [
120128
'driver' => 's3',
121129
'key' => env('AWS_ACCESS_KEY_ID'),

storage/app/public/.temp/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)