Error message received when attempting to add attachment to a record on an instanceDescriptionThere are several common error messages that a user might receive in certain cases when attempting to upload an attachment to a record on a ServiceNow instance. This article will describe some of the most common of these error messages and the cause of that error message appearing. When attempting to add an attachment to a specific record, the user receives an error message indicating the file contains a prohibited file extension, and the attachment is disallowed: <File_Name> has a prohibited file extension. When attempting to upload an attachment to a record the user receives a message regarding a MIME type not synchronized with the actual file name. <File_Name>: File type not permitted or mime type does not match the file content The following error message may also sometimes appear when a user attempts to add an attachment to a record on the instance. <File_Name> is <File_Size>. The maximum file size is <Maximum_Size> CauseThere is usually a specific major cause for each of these messages. Most of these issues are caused by the current setting of a specific system property on the instance. The usual cause of the first issue (prohibited file extension) is that the instance currently is configured to block all file type attachments except a specific inclusion list of file type extensions. By default, on a new out-of-box instance there are no such restrictions, however many customers, for security reasons, will configure the instance to only allow specific file extension types to be uploaded and attached to records on the instance. It's probable that the extension of the file which the user is attempting to attach to the record is not on the configured list of allowed file extension types. If the system property is blank, the system will not restrict file extensions for attached files. Important Note: It should also be noted that during the attachment process, the file extension is converted to lower case. Thus, in order to ensure parity with the names found in this file extension list, any file extensions typed in for this property should always be in all lower case letters. The cause of the second issue is similar to the first issue but is due to a mismatch amongst the file extension and MIME type of the file that is attempting to be added to the instance. The file itself may be internally represented with a MIME type of .pdf but the file extension as part of the filename itself is showing as .rtf. This checking is controlled by a specific system property on the instance. The usual cause of the third error message is because the file attempting to be uploaded is of larger size than the maximum allowable attachment file size on the instance. The default setting for this property on a new, out-of-box instance is 1024 MB, but this value can be adjusted by the instance System Administrator. ResolutionMany of these issues can often be resolved on a per-case basis to ensure the file can still be attached. However, in certain cases, the system configuration may need to be adjusted if these issues are frequently occurring for users performing essential job functions. Each of these issues will be briefly examined. Prohibited File Extension For the issue regarding a disallowed file type, the end-user can often attempt to save the file in a different format. For example, for a text file, most text editor programs will allow the file to be saved in a variety of formats. If one particular file format is not allowed, another type can be tried. This is particularly true for text editors and image editing programs. The .zip file extension is often (but not necessarily always) included as an allowed file extension. In some cases, if a conforming file type cannot be found, the file can be compressed into a .zip type format (which will create a new compressed version of the file with a .zip file extension) and then attached. If having trouble finding a format that will allow the file to be attached, the System Administrator of the system should be contacted and asked what the allowable file extensions are. In certain cases, a new allowable file extension may need to be added to the list of these allowable extensions. If this does become necessary, the following steps can be performed: Log in to the instance with an account having admin rights to the instance.Navigate to: System Properties > Security.The Security System Properties page will appear. Locate the property headed by the text "List of file extensions (comma-separated) that can be attached to documents via the attachment dialog. Extensions should not include the dot (.) e.g. xls,xlsx,doc,docx. Leave blank to allow all extensions." Extensions should not include the dot (as an example, the list might be configured to show as; xls,xlsx,doc,docx). Leave blank to allow an attachment to be included with any file extension. Add any necessary values to the end of the list. Each file extension type in the list should be added to the end of the list and delimited from the previous text in that field (if any) by a comma. The name should not include the .dot operator as this is already assumed by the system, and doing so will cause the extension to not be properly recognized. There should also be no spaces in the list of file extensions as stored in this property setting. The file extension should also be typed in all lower case letters, as the system when running the comparison to the extension list, will convert the file extension to lower case. The default setting for this property for a new out-of-box instance is to be blank, which indicates that all file extensions are allowed. Thus, clearing the value in this field will allow any file extensions to be uploaded to a record on the instance. After making the necessary adjustments to the property, click one of the Save buttons found on the properties page (either at the top or bottom of the page). Alternatively, the settings of this property can be adjusted directly from the System Properties table by opening the sys_properties record with the name glide.attachment.extensions and updating the Value field of the property with the appropriate list of allowable extension types. Note: It should be noted that the system does not actually check if the attached file is actually of the same MIME type as the attached file. For this property, the system is simply comparing the file extension of the file with the list of allowable file extension types as configured in this list. File Type Not Permitted For the issue in which an error message is received indicating that the file type is not permitted, this usually indicates that the internal MIME type representation of the file is different than the current file extension for this file. In this case, if the internal file type is known, the file extension should be changed to the proper file type representing that file. If this is not one of the prohibited file extensions, the file should then be able to be uploaded as needed. As in the previous error message, the .zip extension is often included in the allowable file extensions. Thus, compressing the file (which will result in a file with a .zip file extension) and then attaching the compressed file should allow the file to be attached as needed. If for some reason, this option needs to be disabled, it can be done, by a System Administrator from the Security Properties page on the instance. To do this, perform the following steps: Log in to the instance with an account having admin rights to the instance.Navigate to: System Properties-> Security.From the Security properties page that appears, locate the property which has the heading of "This property must be set to activate MIME type checking for uploads (All version Eureka and up). Enables (true) or disables (false) mime type validation for file attachments. File extensions configured via glide.attachment.extensions will be checked for MIME type during upload." This is a boolean property. To de-activate the property ensure the checkbox shows as unchecked (set to a value of No). To recheck the property reset the property (ensure the value shows as checked). After setting the property to the necessary value, click the Save button at the top or bottom of the page. The default setting for this property on an out-of-box instance is No (unchecked). Note that this adjustment could also be made directly from the sys_properties record for this property. The name of the property is glide.security.file.mime_type.validation. The property is stored in the instance as a true/false property, so the value can be turned on by selecting true and turned off by selecting false. Maximum File Size Error For the issue in which the file cannot be attached due to the fact that the file size is larger than the configured maximum size on the instance, the best option is to compress the file and then attempt to attach the file again. If the file is still too large after compression, check with the System Administrator as the maximum file size setting may need to be adjusted. The default setting for this property in a new out-of-box instance is 1024 MB. To adjust this maximum file size, the following steps can be performed: Log in to the instance with an admin account.Browse to the following location on the instance: System Properties > Security.The Security System Properties page will appear. Locate the property on the page that shows the header "Maximum file attachment size in megabytes". Set the property to the necessary setting. Setting this to a blank value will allow unlimited size for these attachments (up to the 1 GB maximum attachment size specified at the system level). After setting this value to the necessary size, click the Save button at the top or bottom of the Security Properties page. As with the other settings on this page, the value for this property can also be set directly from the sys_properties record corresponding to this property setting. The property name is com.glide.attachment.max_size. The property is an integer value, so the value should be set to the necessary value (shown in Megabytes).NOTE: There is a different set of properties that control attachment settings for emails. However, the Maximum File Attachment Size setting as described above will override the maximum size set for the Email settings if this property is set to a lower maximum threshold.Additional InformationHow to adjust the maximum allowable size of an attachment to a recordLarge attachments may cause Out Of Memory errors and performance degradation