From 9870ac8bab88d97f11af0ce4594ccb72f13ffe55 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Wed, 13 Nov 2024 13:28:03 +0100 Subject: [PATCH] Fix response code of multiple upload --- src/MediaController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MediaController.php b/src/MediaController.php index 85aa46c..f544fd9 100644 --- a/src/MediaController.php +++ b/src/MediaController.php @@ -66,7 +66,7 @@ class MediaController $collection->runCallback('after', $model->fresh()); - return $isSingle ? MediaData::from($medias->first()) : MediaData::collect($medias); + return $isSingle ? MediaData::from($medias->first()) : response(MediaData::collect($medias), 201); } protected function storeDeferred(Request $request)