Gets or sets the allowed MIME types for uploading.
Namespace: Telerik.WebControls
Assembly: RadUpload (in RadUpload.dll)
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property AllowedMimeTypes As String() |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As RadUpload
Dim value() As String
instance.AllowedMimeTypes = value
value = instance.AllowedMimeTypes
|
| C# | |
|---|
public string[] AllowedMimeTypes {get; set;} |
Return Value
The default value is empty string array. In order to check for multiple mime
types you should set an array of strings containing the allowed MIME types
for uploading.
Example
This example demostrates how to set multiple allowed MIME types to a RadUpload
control.
| Visual Basic | Copy Code |
|---|
Dim commaSeparatedMimeTypes As String = "application/octet-stream,application/msword,video/mpeg"
Dim allowedMimeTypes As String() = commaSeparatedMimeTypes.Split(",")
RadUpload1.AllowedMimeTypes = allowedMimeTypes |
| C# | Copy Code |
|---|
// For example you can get these from your web.config file string commaSeparatedMimeTypes = "application/octet-stream,application/msword,video/mpeg";
string[] allowedMimeTypes =
commaSeparatedMimeTypes.Split(',');
RadUpload1.AllowedMimeTypes = allowedMimeTypes;
|
Remarks
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also