blazor-404494-components-file-management-upload-files-to-cloud-storage.md
The DevExpress Blazor Upload component allows you to upload files to a web server or cloud storage. Follow the steps below to configure your Blazor application to upload files to Microsoft Azure:
Create a storage account on Azure. Refer to Microsoft documentation for instructions: Create a storage account.
Specify the Azure connection string in the appsettings.json file as follows:
Open Package Manager in Visual Studio ( Tools → NuGet Package Manager → Manage Packages for Solution… ). In the invoked widow, install the Azure.Storage.Blobs package.
Create an Upload Controller as described in the following section: Create an Upload Controller on the Server.
In the controller class, obtain the Azure connection string and assign it to a variable as follows:
Implement a controller action that uploads a file to the Azure Blob storage:
Add a DxUpload component to your Blazor application’s markup. Specify UploadUrl and Name properties. The Name property value must match the Upload action’s parameter name.
Run the application. You can now upload a file:
The DevExpress Blazor Upload component can split large files into small packets and send them to the server in multiple requests (one by one). To enable chunk upload, set the ChunkSize property to a positive value that specifies the packet size in bytes.