Skip Navigation
Expand
  • Advanced SearchOpens new dialog
    Enter plus (+) or minus (-) signs in search terms to make a word required or excluded
    Search Tips
    Filter by product
    Filter by category
File Extension Type restrictions for uploading files in Chat
Answer ID 12603   |   Last Review Date 03/27/2025

How do you restrict file extension types when customers upload a file in chat?

Environment: 

Chat, File attachments

Resolution:

Administrators can configure the list of file extensions accepted during chat by modifying configuration setting VALID_FILE_EXTENSIONS. More details can be found in our Online documentation at this link: Configure File Types.

 

Click here for information on file extensions accepted when chats are submitted via chat_landing page on Customer Portal

In Customer Portal (CP) versions 3.8 and lower there is a 'valid_file_extensions' attribute in the ChatAttachFileButton widget where you can define a list of accepted file extensions without leading periods and separated by commas. CP 3.9 and greater uses the CP.ValidFileExtensions and CP.ValidFileMimeTypes values set in siteConfig.json instead.

Please note, the 'valid_file_extensions' default for the attribute is defined by all extensions.

You can edit this widget by going to the path below:

Customer Portal v3.x (3.8 and lower):

standard/chat/ChatAttachFileButton

Example:
<rn:widget path="chat/ChatAttachFileButton" valid_file_extensions="gif,pdf,doc" />

 
For customers on CX version 23A+ will also have access to a config verb called VALID_FILE_EXTENSIONS. You will need to make sure that any changes you make to the siteConfig.json (CPv3.9), or 'valid_file_extensions widget (CPv3.8) matches the config verb. If not, then the restrictions will not work.
 
To edit widgets, you will need to access to Customer Portal first. For more information about Customer Portal, please see Overview of Customer Portal section in documentation.
 
To access your Customer Portal, you’ll also need a WebDAV client for downloading and uploading files. Please see Answer 2600: Configuring WebDAV connection to access the Customer PortalAnswer 2600: Configuring WebDAV connection to access the Customer Portal or Answer 4704: Popular Answers About WebDAVAnswer 4704: Popular Answers About WebDAV for more information about using WebDAV. 
 
The widget can be found in file: cp/customer/development/views/pages/chat/chat_landing

 

Please note that this configuration setting will affect all Chat widgets, as well as Incidents. See also: File Extension Type restrictions when creating incident from Ask a Question page