This commit is contained in:
Čarodej
2021-12-21 10:34:15 +01:00
parent dc0dedffea
commit f5e182baf6
9 changed files with 14 additions and 29 deletions
@@ -3,10 +3,8 @@ namespace Domain\Files\Actions;
use Illuminate\Support\Facades\Storage;
class ProcessImageThumbnailAction
{
public function __construct(
public GenerateImageThumbnailAction $generateImageThumbnail,
) {}
@@ -27,10 +25,8 @@ class ProcessImageThumbnailAction
$file,
string $userId
): void {
// Create thumbnail from image
if (in_array($file->getClientMimeType(), $this->availableFormats)) {
// Make copy of file for the thumbnail generation
Storage::disk('local')->copy("files/$userId/{$fileName}", "temp/$userId/{$fileName}");