Try our conversational search powered by Generative AI!

Restrict file types that are allowed to at in the file manager

Vote:
 

Hi,

I'm trying to exclude som file types from beiing added in the file manager with out any success.

I have tried to add the "llegalCharactersRegex" attribute with an extension of the default regex to the 

<add showInFileManager="true" virtualName="Global Files" virtualPath="~/Global/"
bypassAccessCheck="false" indexingServiceCatalog="Web" physicalPath="...\Global"
customFileSummary="~/FileSummary.config" name="SiteGlobalFiles"
type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" />

But this did no have any effect. But is this the right element to put the illegalCharactersRegex attribute?

#73352
Jul 16, 2013 9:59
Vote:
 

The illegalCharactersRegex attribute should be placed on the <virtualpath> element, not the <add> subelement.

I.e. should look like this:

<virtualPath illegalCharactersREgex="yourRegexHere" customFileSummary="~/FileSummary.config">
   <providers>
      <add showInFileManager="true" virtualName="Global Files" virtualPath="~/Global/" etc etc />
   </providers>
</virtualPath>

 

More information on restricting file types in file manager can be found at http://world.episerver.com/Blogs/Al-Higgs/Dates/2012/11/Restricting-the-file-types/

#75699
Edited, Oct 04, 2013 1:19
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.