<commit_before>if UploadFS?
	@fileCollection = new Mongo.Collection 'rocketchat_uploads'
	fileCollection.allow
		insert: (userId, doc) ->
			return userId

		update: (userId, doc) ->
			return userId is doc.userId

		remove: (userId, doc) ->
			return userId is doc.userId


	fileUploadMediaWhiteList = ->
		return _.map(RocketChat.settings.get('FileUpload_MediaTypeWhiteList').split(','), (item) -> return item.trim() )

	@fileUploadIsValidContentType = (type) ->
		list = fileUploadMediaWhiteList()

		if _.contains list, type
			return true
		else
			wildCardGlob = '/*'
			wildcards = _.filter list, (item) -> return item.indexOf(wildCardGlob) > 0
<commit_msg>Adding support for all files (i.e. empty white list)<commit_after>if UploadFS?
	@fileCollection = new Mongo.Collection 'rocketchat_uploads'
	fileCollection.allow
		insert: (userId, doc) ->
			return userId

		update: (userId, doc) ->
			return userId is doc.userId

		remove: (userId, doc) ->
			return userId is doc.userId


	fileUploadMediaWhiteList = ->
		return unless RocketChat.settings.get('FileUpload_MediaTypeWhiteList')

		return _.map(RocketChat.settings.get('FileUpload_MediaTypeWhiteList').split(','), (item) -> return item.trim() )

	@fileUploadIsValidContentType = (type) ->
		list = fileUploadMediaWhiteList()

		if !list or _.contains list, type
			return true
		else
			wildCardGlob = '/*'
			wildcards = _.filter list, (item) -> return item.indexOf(wildCardGlob) > 0

{'fraction_non_alphanumeric': 0.12206896551724138, 'fraction_numerical': 0.001379310344827586, 'mean_word_length': 4.200716845878136, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '771528', 'n_tokens_mistral': 514, 'n_tokens_neox': 463, 'n_words': 115}