UploadHelperRestrictExtensions Method |
Restricts allowed file extensions by file extensions defined by the CMSUploadExtensions setting (extensions not defined by this setting cannot be uploaded).
Extensions are without dots and separated by semicolon (e.g. jpg;png;gif).
If no file extension is allowed then "NO_ALLOWED_EXTENSION" is returned.
Namespace: CMS.Base.Web.UIAssembly: CMS.Base.Web.UI (in CMS.Base.Web.UI.dll) Version: 13.0.131
Syntax public static string RestrictExtensions(
string allowedExtensions,
string siteName
)
Parameters
- allowedExtensions
- Type: SystemString
File extensions to be restricted - siteName
- Type: SystemString
Name of the site
Return Value
Type:
StringSee Also