# File Format Check Module for OpenConf

This module verifies whether an uploaded file matches the selected format. Instead of relying on the file extension or browser-provided MIME type, at least for the formats below, the file itself is inspected to determine its format through signature matching. If a signature is not available, the file extension is checked instead.

Signature checking is currently available for the following:

- Adobe PDF
- HTML
- Microsoft Word
- PostScript
- RTF
- WordPerfect
- XML

### Requirements

none

### Configuration

Options are provided in this module's settings that allow excluding Office (2007) Open XML documents (.docx) and RTF documents from being accepted as Word documents.

### Usage

When a file is uploaded, the detected file format is automatically verified against the selected format. If the format does not match, the upload will not be completed and a notice is displayed.

Version 3.0.1
- Fixed missing setting export/import hooks

Version 3.0.0
- Added file format identification using PHP Fileinfo

Version 2.0.1
- Added file extension verification of MS Office 2007+ formats

Version 2.0.0
- Added settings import/export
- Added module installation and activation as part of standard OpenConf installation
- Added support for custom Author/Chair name
- Added alternative file extensions for jpg and mpg
- Renamed module to File Format Check

Version 1.0.5
- Fixed HTML file type verification

Version 1.0.4
- Dropped setting MOD_FILETYPE_allow_officeopenxml as .docx/.xlsx/.pptx added as MIME types
- Changed paperid to mediumint(6)
- Changed author-file-validate to handle both submission and upload (dropped author-upload-validate)

Version 1.0.3
- Added token check for settings.inc

Version 1.0.2
- Added support for file type validation of files uploaded during initial submission

Version 1.0.1
- Fixed extraneous print in author-upload-validate.inc

Version 1.0.0
- Initial Release