Return a published and mime type data with sourced media uploads

This commit is contained in:
Jonny Barnes 2022-11-20 17:10:19 +00:00
parent 84efc8a3da
commit 42f0fa2238
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
3 changed files with 30 additions and 0 deletions

View file

@ -74,6 +74,8 @@ class MicropubMediaController extends Controller
$media->transform(function ($mediaItem) {
return [
'url' => $mediaItem->url,
'published' => $mediaItem->created_at->toW3cString(),
'mime_type' => $mediaItem->getMimeType(),
];
});