1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 01:05:36 +00:00

Merge pull request #2642 from stelzch/dev

Create directory in InstagramImport
This commit is contained in:
daniel 2021-04-29 23:52:09 -06:00 committed by GitHub
commit f25452ea1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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));