File Uploader
- 3 minutes to read
FileUploader is a UI component that allows users to upload files to the server. Users can select files in the file explorer or drag and drop them onto the FileUploader area on the page.
Getting Started
The FileUploader UI Control is based on the DevExtreme FileUploader component.
The following help topics explain how to add this control to your project:
- Add DevExtreme to a Visual Studio Project or Configure a non Visual Studio Project
- Add Controls to a Project
- Razor Syntax
Basic Syntax
@(Html.DevExtreme().FileUploader()
.UploadUrl(Url.Action("UploadFile"))
)
Built-in Capabilities and Configuration Guides
Uploading Options
Upload files instantly, when a user clicks the Upload button, or when an HTML form is submitted.Chunk Uploading
DevExtreme FileUploader supports chunk upload. Large files are split into chunks and sent with multiple requests. Server-side configuration is required.Multiple Files Uploading
Allow users to select one file or multiple files simultaneously.File Restrictions
Restrict types of files and specify allowed file extensions. Set maximum/minimum file size.Validation
All DevExtreme component validation options are available for FileUploader. Configure validation errors and check if FileUploader is dirty. Files are validated on the client, but server-side validation is also necessary.Custom Drop Zone
The FileUploader component supports drag-and-drop file uploads. Set the dropZone property to a custom HTML element to enable file dropping in that element. The drop area can be customized.
API
Server-Side API
- Initialization
- Call the FileUploader() method to create a FileUploader control. This action initializes a FileUploaderBuilder instance. Use the instance methods to specify FileUploader options and event handlers.
- Options
- For a complete option list, see FileUploaderBuilder Members. For details on how to specify control options, refer to the following help topic: Specify Options.
- Events
- For available events, see Events. For details on how to handle events, refer to the following help topic: Handle Events and Define Callbacks.
Client-Side API
- Options
- If you need to specify the FileUploader options dynamically on the client side, use client-side API. For a complete option list, see DevExtreme FileUploader options.
- Methods
- For a list of available methods, see DevExtreme FileUploader methods. For details on how to call methods, refer to the following help topic: Call Methods.