Skip to content

[6.x] Add video asset extensions - #15378

Merged
jasonvarga merged 4 commits into
statamic:6.xfrom
daun:feat/video-extensions
Sep 7, 2026
Merged

[6.x] Add video asset extensions#15378
jasonvarga merged 4 commits into
statamic:6.xfrom
daun:feat/video-extensions

Conversation

@daun

@daun daun commented Sep 5, 2026

Copy link
Copy Markdown
Contributor
  • Add three missing video formats: mpg, mpeg, and mkv
  • Extend tests to cover those as well as missing mov case

@jasonvarga jasonvarga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning — src/Rules/AllowedFile.php (AllowedFile::EXTENSIONS) is missing mkv. This list gates every asset/file upload path (CP asset uploads via AssetsController, CP file fieldtype uploads, frontend form file uploads). mpg/mpeg are already present there, but mkv is not, so uploading a .mkv file will still be rejected by validation even after this PR merges — defeating the PR's stated purpose for that extension. Add 'mkv' to that list.

Warning — src/Support/FileTypes.php:36 (FileTypes::video()) is a second, independently-maintained list of video extensions that this PR did not update. It's used by the CP asset browser's "Video" filter (src/Query/Scopes/Filters/Fields/FileType.php:46), so filtering assets by type "Video" will not surface .mpg/.mpeg/.mkv files even though Asset::isVideo() now recognizes them — an inconsistency introduced by this PR. Update the list to match Asset::VIDEO_EXTENSIONS.

@jasonvarga
jasonvarga enabled auto-merge (squash) September 7, 2026 18:54
@daun

daun commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

@jasonvarga Updated to re-use the existing lists & added missing extension for parity.

@jasonvarga
jasonvarga merged commit 7aa0eb8 into statamic:6.x Sep 7, 2026
61 checks passed
@daun
daun deleted the feat/video-extensions branch September 7, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants