Attachment can be restricted based on their mimetypes

Last modified by Thomas Mortagne on 2022/11/28

It is now possible to limit the attachments uploaded on a space based on their mimetypes. This attachment validation is now applied on attachment upload using the attachment pane, the REST API, and CKEditor image dialog.

The configuration can be done at farm level with xwiki.properties (see below), at wiki level in the administration, in the Attachments Restriction section, or at space level using the page administration.

#-# [Since 14.10RC1]
#-# Define the list of allowed attachment mimetypes. By default, this list is empty, but you can specify a 
#-# comma-separated list of allowed mimetypes. Note that a joker (*) can be used to accept any media type. Once this
#-# list is not empty, any attachment with an unlisted mimetype will be rejected.
#-# For instance, if you want to only accept plain text and any kind of images, you can set the list to:
#-# text/plain,image/*
# attachment.upload.allowList=

#-# [Since 14.10RC1]
#-# Define the list of blocked attachment mimetypes. By default, this list is empty, but you can specify a 
#-# comma-separated list of blocked mimetypes. Note that a joker (*) can be used to accept any media type. Once this 
#-# list is not empty, any attachment matching one of the listed mimetype will be rejected.
#-# For instance, if you want to reject plain text and any kind of images, you can set the list to:
#-# text/plain,image/*
#-#
# attachment.upload.blockList=

 

Tags:
   

Get Connected