Class FileManagerUploadSettings
Defines the upload settings for the filemanager component.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.FileManager
Assembly: Syncfusion.Blazor.dll
Syntax
public class FileManagerUploadSettings : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
FileManagerUploadSettings()
Declaration
public FileManagerUploadSettings()
Properties
AllowedExtensions
Specifies the extensions of the file types allowed in the file manager component and pass the extensions with comma separators. For example, if you want to upload specific image files, pass allowedExtensions as ".jpg,.png".
Declaration
[Parameter]
public string AllowedExtensions { get; set; }
Property Value
| Type |
|---|
| string |
AutoClose
Defines whether to close the upload dialog after uploading all the files.
Declaration
[Parameter]
public bool AutoClose { get; set; }
Property Value
| Type |
|---|
| bool |
AutoUpload
By default, the FileManager component initiates automatic upload when the files are added in upload queue. If you want to manipulate the files before uploading to server, disable the autoUpload property. The buttons "upload" and "clear" will be hided from file list when the autoUpload property is true.
Declaration
[Parameter]
public bool AutoUpload { get; set; }
Property Value
| Type |
|---|
| bool |
ChunkSize
Specifies the ChunkSize to split the large file into chunks and upload it to the server in a sequential order.
Declaration
[Parameter]
public double ChunkSize { get; set; }
Property Value
| Type | Description |
|---|---|
| double | If the ChunkSize property has value, the File Manager enables the chunk upload by default. It must be specified in bytes value. |
Remarks
This property is particularly useful for uploading large files to the File Manager, as it allows for more efficient and reliable uploads by dividing the file into smaller pieces. Note that while the property defines the chunk size, an appropriate tokenizer or similar mechanism is required on the server to handle the division and processing of the file data into chunks, ensuring seamless upload and reassembly on the server.
DirectoryUpload
Gets or sets a boolean value that indicates whether the directory (folder) can be browsed and uploaded in the FileManager component.
Declaration
[Parameter]
public bool DirectoryUpload { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
Enabling directory upload allows users to upload directories (folders) by selecting the directory upload option in the toolbar or by dragging and dropping directories into the file manager. When directories are uploaded, all files and subdirectories within them are also uploaded. Note that directory (folder) upload is only supported by the following file system providers:
- Physical provider
- NodeJS provider
- Azure provider
- Amazon S3 provider
DropArea
Gets or sets the selectors for target elements to perform file uploads with drag and drop interactions.
Declaration
[Parameter]
public string DropArea { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Accepts a string value that denotes the selector where the file has to be dropped. The default value is layout area of the corresponding File Manager. |
MaxFileSize
Specifies the maximum allowed file size to be uploaded in bytes. The property is used to make sure that you cannot upload too large files.
Declaration
[Parameter]
public double MaxFileSize { get; set; }
Property Value
| Type |
|---|
| double |
MinFileSize
Specifies the minimum file size to be uploaded in bytes. The property is used to make sure that you cannot upload empty files and small files.
Declaration
[Parameter]
public double MinFileSize { get; set; }
Property Value
| Type |
|---|
| double |
UploadMode
Gets or sets the upload mode to perform the upload operation.
Declaration
[Parameter]
public UploadMode UploadMode { get; set; }
Property Value
| Type | Description |
|---|---|
| UploadMode | FormSubmit performs the upload operation using the form submit method; HttpClient performs the upload using the HTTP client instance. The default value is FormSubmit. |
Remarks
Use this property to specify the upload method in the File Manager component. By setting this property to HttpClient, you can handle the upload operation using the HTTP client instance, which allows you to authorize the upload response.
Methods
Dispose(bool)
Dispose unmanaged resources in the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | Boolean value to dispose the object. |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | Task. |