diff --git a/CHANGELOG.md b/CHANGELOG.md index a491edf..7cb1a84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + +- `fileUploadService.restrictedFileTypes` + ## [8.8.1] - 2025-09-15 ### Changed diff --git a/src/fileUploadService.ts b/src/fileUploadService.ts index 3ab1a36..7fc3654 100644 --- a/src/fileUploadService.ts +++ b/src/fileUploadService.ts @@ -15,3 +15,26 @@ export function getContentDisposition(filename: string): string { return `attachment; filename*=UTF-8''${encodeURIComponent(filename)}` } + +/** + * A default list of files types (extensions) that is allowed. + */ +export const restrictedFileTypes = [ + 'avif', + 'apng', + 'png', + 'jpg', + 'jpeg', + 'jfif', + 'pjpeg', + 'pjp', + 'gif', + 'pdf', + 'heic', + 'heif', + 'doc', + 'docx', + 'xls', + 'xlsx', + 'csv', +]