Update docs

This commit is contained in:
Alan Grainger
2026-10-07 18:04:57 +13:00
parent 7a9ff2e6ee
commit 172f247418
14 changed files with 243 additions and 37 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
// to the request body.
import { createLimiter } from '../shared/limiter.js'
import { fileType, formatSize, isUploadableType } from '../shared/upload.js'
import { fileType, formatSize, isUploadableName, isUploadableType } from '../shared/upload.js'
import type { UploadErrorResponse, UploadPageConfig, UploadResponse } from '../shared/upload.js'
import {
ICON_ALERT_CIRCLE,
@@ -305,7 +305,7 @@ function queueFiles (files: File[]) {
const type = fileType(file.name, file.type)
const row = addRow(file, type)
stats.total++
if (!isUploadableType(type)) {
if (!isUploadableType(type) || !isUploadableName(file.name)) {
finish(row, 'error', 'Only photos and videos can be sent')
} else if (file.size > config.maxFileSize) {
finish(row, 'error', 'Larger than the ' + formatSize(config.maxFileSize) + ' limit')