diff --git a/helpers.php b/helpers.php index cfcc0bc6cf..c602750faa 100644 --- a/helpers.php +++ b/helpers.php @@ -250,7 +250,11 @@ function sanitizeVueExp($expression) function packTemporalData($data) { $uid = uniqid('data_', true); - $path = storage_path('app/private/' . $uid); + $directory = storage_path('app/private'); + if (!is_dir($directory)) { + mkdir($directory, 0755, true); + } + $path = $directory . '/' . $uid; file_put_contents($path, json_encode($data));