Blocking file types from being uploaded in Content Station
Many file types can be uploaded to Enterprise by using Content Station. Which files can be uploaded is defined in a list.
Sometimes though, it might be desired to prevent specific files from being uploaded (such as .exe files). In the same way that file types can be added to the list, file types that are unwanted can also be removed from it.
Step 1. Open the configserver.php file for the Enterprise Server on which the change needs to be made.
<Enterprise Server path>/config
Step 2. Locate the EXTENSIONMAP section.
// EXTENSIONMAP: // Mapping of file types (extensions, for example image.jpg) to their MIME type and // object type as stored in the Enterprise database. // define ('EXTENSIONMAP', serialize( array( '.jpg' => array( 'image/jpeg', 'Image'), '.jpeg' => array( 'image/jpeg', 'Image'), '.gif' => array( 'image/gif', 'Image'), '.tif' => array( 'image/tiff', 'Image'), '.tiff' => array( 'image/tiff', 'Image'), ...
Step 3. Locate the file type that you want to block and do one of the following:
- Comment it out by adding // to the beginning of the line
- Remove the line completely
Step 4. Save the file.
When next trying to upload a file of a type which is not listed in the configserver.php file, the following message will appear:
Warning. The following files are not supported <file name plus extension>.