mediaMetadataService = $mediaMetadataService; } /** * Upload an artist's image * * Upload an image as an artist's image. * * @bodyParam image string required The image's content, in Data URI format. * Example: data:image/jpeg;base64,Rm9v * @responseFile responses/artistImage.update.json * * @return JsonResponse */ public function update(ArtistImageUpdateRequest $request, Artist $artist) { $this->mediaMetadataService->writeArtistImage( $artist, $request->getFileContentAsBinaryString(), $request->getFileExtension() ); event(new LibraryChanged()); return new JsonResponse(['imageUrl' => $artist->image]); } }