From f5aa89b2d2abb8f5c13c5e00338e53c770c0651e Mon Sep 17 00:00:00 2001 From: Christoph Stelz Date: Tue, 9 Feb 2021 08:58:24 +0100 Subject: [PATCH] Add fix for InstagramImport --- app/Jobs/ImportPipeline/ImportInstagram.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Jobs/ImportPipeline/ImportInstagram.php b/app/Jobs/ImportPipeline/ImportInstagram.php index ecbd557ab..1e1d6c3cf 100644 --- a/app/Jobs/ImportPipeline/ImportInstagram.php +++ b/app/Jobs/ImportPipeline/ImportInstagram.php @@ -101,7 +101,11 @@ class ImportInstagram implements ShouldQueue $path = storage_path("app/$importData->path"); $storagePath = "public/m/{$monthHash}/{$userHash}"; - $newPath = "app/$storagePath/$filename"; + $dir = "app/$storagePath"; + if(!is_dir(storage_path($dir))) { + mkdir(storage_path($dir), 0777, true); + } + $newPath = "$dir/$filename"; $fs->move($path,storage_path($newPath)); $path = $newPath; $hash = \hash_file('sha256', storage_path($path));