mediaMetadataService = $mediaMetadataService; } public function update(AlbumCoverUpdateRequest $request, Album $album) { $this->mediaMetadataService->writeAlbumCover( $album, $request->getFileContentAsBinaryString(), $request->getFileExtension() ); event(new LibraryChanged()); return new JsonResponse(['coverUrl' => $album->cover]); } }