Media Drive

Media Drive is the first-party media browser that ships inside the template at packages/filament-media-drive. It is not an optional Composer require. Every clone of Qcentic Edge already has a media library in the sidebar — that is the point of keeping Drive in the published repo rather than in a workstation-only plugin folder.

What ships

  • A Drive page (/drive) with grid and list layouts, browsing Spatie Media Library records on the s3 disk (MinIO locally, Bunny Storage in production).
  • A picker field (MediaPicker) for selecting existing media from any form.
  • Editor ingest fields (MediaMarkdownEditor, MediaRichEditor, MediaLibraryFileUpload) that route uploads through the same Spatie catalog.

The Drive page is not the sidebar entry — Media Library is the nav. /drive stays registered for the picker, tests, and direct URL access.

Why it ships in the template

Media is a baseline need for every clone. Bundling Drive as a Composer path package means a fresh GitHub clone already has a working media library, a picker, and editor image ingest — no extra composer require, no second media table, no third-party UI to evaluate. The package can be extracted to its own repo and registry later if it earns that.

Key invariant

Never pass a Livewire TemporaryUploadedFile directly into the Spatie FileAdder. The temp file's tmpfile() parent is empty, so the adder writes an empty blob and MinIO/S3 rejects it with DiskCannotBeAccessed. Drive copies the bytes to a real local file first, then calls addMedia(). Insert the result with $media->getUrl() — the disk url / AWS_URL when a CDN is configured, otherwise the direct disk URL.

Deep plugin docs

This Stack page is the short orientation. The how-to lives under Plugins:

See also

Built by Qcentic