added temp helper
This commit is contained in:
19
app/Helpers/Temp.php
Normal file
19
app/Helpers/Temp.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/* Temp File Helper Functions */
|
||||
|
||||
|
||||
/**
|
||||
* Generate a temporary file path.
|
||||
*
|
||||
* @return str The filtered array.
|
||||
*/
|
||||
function generateTempFilePath(): string
|
||||
{
|
||||
$temporaryDir = storage_path('app/tmp');
|
||||
if (is_dir($temporaryDir) === false) {
|
||||
mkdir($temporaryDir, 0777, true);
|
||||
}
|
||||
|
||||
return $temporaryDir . DIRECTORY_SEPARATOR . uniqid('upload_', true);
|
||||
}
|
||||
Reference in New Issue
Block a user