Private catalog of temporary storage in Laravel
With Laravel, I assume the folder storage/
is a good place to unpack some temporary files. Therefore, in the code I mentioned this way: storage/tempdir
. As shown below:
$zip = new ZipArchive();
$zip->open($request->excelFile->path());
$dir = "storage/tempdir";
$zip->extractTo($dir);
But the unpacked files end in public/storage/tempdir/
So they are available to the public and I don't want that.
How can I link to storage/tempdir
on both my Windows and Linux machines? Tpi.
+3
source to share