zephyrisle / fof-upload-preview
Preview video, audio, Office documents and PDF files uploaded through FoF Upload on Flarum v2.
Package info
github.com/Zephyr-Isle/fof-upload-preview
Language:TypeScript
Type:flarum-extension
pkg:composer/zephyrisle/fof-upload-preview
dev-main
2026-06-06 11:33 UTC
Requires
- flarum/core: ^2.0
- fof/upload: ^2.0@beta
This package is auto-updated.
Last update: 2026-06-06 11:33:22 UTC
README
A Flarum extension that adds inline previews for files uploaded with fof/upload.
Features
- Video preview powered by DPlayer
- Audio preview powered by APlayer
- PDF preview with iframe embed
- Office preview through Office Web Viewer
- Admin settings for each preview type, preview height and player CDN URLs
Supported file extensions
- Video:
mp4,webm,ogg,ogv,avi,mov,ts,3gp,3g2,m4v - Audio:
mp3,ogg,oga,wav,m4a,aac,flac,opus,weba,mid,midi - PDF:
pdf - Office:
doc,docx,xls,xlsx,ppt,pptx
Recommended FoF Upload MIME regex
^image\/(jpeg|png|gif|webp|avif|bmp|tiff|svg\+xml)$
^video\/(mp4|webm|ogg|x-msvideo|quicktime|mp2t|3gpp|3gpp2)$
^audio\/(mpeg|ogg|wav|flac|aac|webm|x-wav|x-flac|midi)$
^(application\/msword|application\/vnd\.openxmlformats-officedocument\.wordprocessingml\.document|application\/vnd\.ms-excel|application\/vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|application\/vnd\.ms-powerpoint|application\/vnd\.openxmlformats-officedocument\.presentationml\.presentation|application\/pdf)$
Installation
composer require zephyrisle/fof-upload-preview
Then enable the extension in the Flarum admin panel.
Notes
Office Web Viewer only works for publicly accessible document URLs.