getClientMimeType(), $this->availableFormats)) { // Make copy of file for the thumbnail generation Storage::disk('local')->copy("files/$userId/{$fileName}", "temp/$userId/{$fileName}"); // Create thumbnail instantly ($this->generateImageThumbnail)( fileName: $fileName, userId: $userId, execution: 'immediately' ); // Create thumbnail later ($this->generateImageThumbnail)->onQueue()->execute( fileName: $fileName, userId: $userId, execution: 'later' ); } } }