Show configured media upload file types
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 1m20s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 33s

This commit is contained in:
lzstealth committed 2026-10-26 23:39:27 +00:00
1 parent 75b01d49a9
commit 1b5a32cb05
3 files changed
+12 -2

No files matched your search

+4
View File
@@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.
- Media library uploads accept multiple files at once, show per-file progress, and continue the batch when an individual file fails. - Media library uploads accept multiple files at once, show per-file progress, and continue the batch when an individual file fails.
### Fixed
- The media upload dialog lists the configured file extensions.
## 2.21.2 - 2026-10-26 ## 2.21.2 - 2026-10-26
### Fixed ### Fixed
+7 -1
View File
@@ -38,6 +38,7 @@ function getMediaType(file) {
function getUploadLimits(settings) { function getUploadLimits(settings) {
const imageMaxBytes = Number(settings && settings['uploads.image_max_bytes']) || 100 * 1024 * 1024; const imageMaxBytes = Number(settings && settings['uploads.image_max_bytes']) || 100 * 1024 * 1024;
const videoMaxBytes = Number(settings && settings['uploads.video_max_bytes']) || 1024 * 1024 * 1024; const videoMaxBytes = Number(settings && settings['uploads.video_max_bytes']) || 1024 * 1024 * 1024;
const allowedMimeTypes = Array.isArray(settings && settings['uploads.allowed_mime_types']) ? settings['uploads.allowed_mime_types'] : [];
const formatBytes = function (bytes) { const formatBytes = function (bytes) {
const megabytes = bytes / 1024 / 1024; const megabytes = bytes / 1024 / 1024;
if (megabytes >= 1024 && megabytes % 1024 === 0) { if (megabytes >= 1024 && megabytes % 1024 === 0) {
@@ -50,7 +51,12 @@ function getUploadLimits(settings) {
videoMaxBytes: videoMaxBytes, videoMaxBytes: videoMaxBytes,
imageMaxLabel: formatBytes(imageMaxBytes), imageMaxLabel: formatBytes(imageMaxBytes),
videoMaxLabel: formatBytes(videoMaxBytes), videoMaxLabel: formatBytes(videoMaxBytes),
allowedMimeTypes: Array.isArray(settings && settings['uploads.allowed_mime_types']) ? settings['uploads.allowed_mime_types'] : [] allowedMimeTypes: allowedMimeTypes,
allowedFileTypesLabel: allowedMimeTypes.map(function (mimeType) {
const subtype = String(mimeType || '').split('/')[1] || '';
const extension = subtype === 'jpeg' ? 'jpg' : subtype === 'svg+xml' ? 'svg' : subtype;
return extension ? '.' + extension : '';
}).filter(Boolean).join(', ')
}; };
} }
@@ -120,7 +120,7 @@
<span class="slide-image-region-upload-zone-icon"><i class="bi bi-cloud-arrow-up" aria-hidden="true"></i></span> <span class="slide-image-region-upload-zone-icon"><i class="bi bi-cloud-arrow-up" aria-hidden="true"></i></span>
<span class="slide-image-region-upload-zone-copy"> <span class="slide-image-region-upload-zone-copy">
<strong>Drop images or videos here or click to select files</strong> <strong>Drop images or videos here or click to select files</strong>
<span>Images and videos enabled in Media Uploads settings</span> <span>Allowed file types: {{uploadLimits.allowedFileTypesLabel}}</span>
<span class="slide-image-region-upload-zone-limit">Images max {{uploadLimits.imageMaxLabel}}; videos max {{uploadLimits.videoMaxLabel}}</span> <span class="slide-image-region-upload-zone-limit">Images max {{uploadLimits.imageMaxLabel}}; videos max {{uploadLimits.videoMaxLabel}}</span>
</span> </span>
</span> </span>