RadCloudUpload
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[RequiredScript(typeof(jQueryPlugins))]
[RequiredScript(typeof(MaterialRipple))]
[ClientScriptResource("Telerik.Web.UI.RadCloudUpload", "Telerik.Web.UI.CloudUpload.RadCloudUploadScripts.js")]
[TelerikToolboxCategory("Upload")]
[ToolboxBitmap(typeof(RadCloudUpload), "Toolbox.Icons.CloudUpload.png")]
[EmbeddedSkin("CloudUpload", typeof(RadCloudUpload))]
[EmbeddedSkin("CloudUpload", "Default", typeof(RadCloudUpload))]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadCloudUpload))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadButton))]
public class RadCloudUpload : RadWebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl
Inheritance: objectControlWebControlRadWebControlRadCloudUpload
Implements:
Inherited Members
Constructors
public RadCloudUpload()
Properties
Gets or sets the allowed file extensions for uploading.
[TypeConverter(typeof(ListConverter))]
[PersistenceMode(PersistenceMode.Attribute)]
[Bindable(true)]
public string[] AllowedFileExtensions { get; set; }
The default value is empty string array. In order to check for multiple file extensions you should set an array of strings containing the allowed file extensions for uploading.
Set this property to empty array of strings in order to prevent the file extension checking.
The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()
protected override string CssClassFormatString { get; }
Overrides:
Gets or sets the selected culture. Localization strings will be loaded based on this value.
public CultureInfo Culture { get; set; }
The culture.
Gets or sets the drop zones for upload.
[TypeConverter(typeof(ListConverter))]
[PersistenceMode(PersistenceMode.Attribute)]
[Bindable(true)]
public string[] DropZones { get; set; }
The values of the property should be a valid jQuery selectors. E.g. class name or Id of html element.
Gets or sets a value indicating if RadCloudUpload should check for the Amazon, and Azure assemblies.
public bool EnableAssembliesDetection { get; set; }
Gets or sets a value indicating if RadCloudUpload should check the Telerik.Web.UI.WebResource handler existence in the application configuration file.
public bool EnableHandlerDetection { get; set; }
The check is not performed when custom handler is used.
Used to customize the appearance and position of the file list panel of the RadCloudUpload.
[PersistenceMode(PersistenceMode.InnerProperty)]
public FileListPanelSettings FileListPanelSettings { get; }
Specifies the URL of the HTTPHandler from which the image will be served
Gets the localization.
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public CloudUploadLocalization Localization { get; }
The localization.
Gets or sets a value indicating where RadCloudUpload will look for its .resx localization files.
public string LocalizationPath { get; set; }
The localization path.
Gets or sets the maximum file size allowed for uploading in bytes.
[PersistenceMode(PersistenceMode.Attribute)]
[Bindable(true)]
public long MaxFileSize { get; set; }
The default value is 0 (unlimited).
Set this property to 0 in order to prevent the file size checking.
Specifies whether RadCloudUpload allows selecting multiple files in the File Selection dialog.
public MultipleFileSelection MultipleFileSelection { get; set; }
The default value is Disabled
Setting the MultipleFileSelection property to Automatic means that RadCloudUpload will check the client's browser capabilities and if there is support for multiple file selection he will enable it. If there is no such support, the selection type would be still single.
Gets or sets the name of the client-side function which will be executed after a file is selected
[Browsable(true)]
[Bindable(true)]
public string OnClientFileSelected { get; set; }
The default value is string.Empty.
Gets or sets the name of the client-side function which will be executed after files are selected.
[Browsable(true)]
[Bindable(true)]
public string OnClientFilesSelecting { get; set; }
The default value is string.Empty.
Gets or sets the name of the client-side function which will be executed after files is being uploaded. It is applicable when MultipleFileSelection is available and many files are selected at once.
[Browsable(true)]
[Bindable(true)]
public string OnClientFilesUploaded { get; set; }
The default value is string.Empty.
Gets or sets the name of the client-side function which will be executed after a file is being uploaded.
[Browsable(true)]
[Bindable(true)]
public string OnClientFileUploaded { get; set; }
The default value is string.Empty.
Gets or sets the name of the client-side function which will be executed before a file is being uploaded.
[Browsable(true)]
[Bindable(true)]
public string OnClientFileUploading { get; set; }
The default value is string.Empty.
Gets or sets the name of the client-side function which will be executed when file is removed from uloaded/invalid files collections.
[Browsable(true)]
[Bindable(true)]
public string OnClientFileUploadRemoved { get; set; }
The default value is string.Empty.
Gets or sets the name of the client-side function which will be executed when file is going to be removed from uloaded/invalid files collections.
[Browsable(true)]
[Bindable(true)]
public string OnClientFileUploadRemoving { get; set; }
The default value is string.Empty.
Gets or sets the name of the client-side function which will be executed after the control is loaded
[Browsable(true)]
[Bindable(true)]
public string OnClientLoad { get; set; }
The default value is string.Empty.
Gets or sets the name of the client-side function which will be executed when file upload failed.
[Browsable(true)]
[Bindable(true)]
public string OnClientUploadFailed { get; set; }
The default value is string.Empty.
Gets or sets the name of the client-side function which will be executed when file validation failed (by size/type).
[Browsable(true)]
[Bindable(true)]
public string OnClientValidationFailed { get; set; }
The default value is string.Empty.
Get or sets the provider used by the RadCloudUpload.
public virtual ProviderType ProviderType { get; set; }
The property should be set to one of the existing providers otherwise an exception will be thrown.
protected override bool SupportsRenderingMode { get; }
Overrides:
protected override HtmlTextWriterTag TagKey { get; }
Overrides:
Gets a collection with information about the uploaded files.
[Browsable(false)]
public CloudUploadFileInfoCollection UploadedFiles { get; }
Methods
protected override void AddAttributesToRender(HtmlTextWriter writer)
Overrides:
protected virtual void CheckCloudUploadConfiguration()
protected virtual void CheckForAssemblyReferences()
This method should return object that implements ICloudUploadRenderer or Inherits the CloudUploadRenderer class.
protected override void DescribeComponent(IScriptDescriptor descriptor)
Overrides:
Executed when post data is loaded from the request
protected override bool LoadPostData(string postDataKey, NameValueCollection postCollection)
Overrides:
protected virtual void OnCloudUploadedFile(CloudFileUploadedEventArgs eventArgs)
Executed when post data changes should invoke a changed event
protected override void RaisePostDataChangedEvent()
Overrides:
protected override void RenderContents(HtmlTextWriter writer)
Overrides:
Events
Occurs once for each of the uploaded files after a postback.
public event CloudFileUploadedEventHandler FileUploaded