This repository contains the ASP.NET Core Azure storage file system providers for the Syncfusion File Manager component.
Azure file system provider serves the file system support for the FileManager component with the Microsoft Azure blob storage.
The following actions can be performed with Azure file system Provider.
Actions | Description |
---|---|
Read | Reads the files from Azure blob container. |
Details | Provides details about files Type, Size, Location and Modified date. |
Download | Downloads the selected file or folder from the Azure blob. |
Upload | Uploads a files to Azure blob. t accepts uploaded media with the following characteristics:
|
Create | Creates a new folder. |
Delete | Removes a file from Azure blob. |
Copy | Copys the selected Files from target. |
Move | Pastes the copied files to the desired location. |
Rename | Renames a folder or file. |
Search | Searches a file or folder in Azure blob. |
In order to run the service, we need to create the Azure blob storage account and register the Azure storage details like account name, password and blob name details with in the RegisterAzure method.
RegisterAzure(string accountName, string accountKey, string blobName)
To run this application, clone the azure-aspcore-file-provider
repository and then navigate to its appropriate path where it has been located in your system.
To do so, open the command prompt and run the below commands one after the other.
git clone https://github.com/azure-aspcore-file-provider azure-aspcore-file-provider
cd azure-aspcore-file-provider
Once cloned, open solution file in visual studio.Then build the project after restoring the nuget packages and run it.
To access the basic actions such as Read, Delete, Copy, Move, Rename, Search, and Get Details of File Manager using Azure service, just map the following code snippet in the Ajaxsettings property of File Manager.
Here, the hostUrl
will be your locally hosted port number.
var hostUrl = http://localhost:62870/;
ajaxSettings: {
url: hostUrl + 'api/AzureProvider/AzureFileOperations'
}
To perform download operation, initialize the downloadUrl
property in ajaxSettings of the File Manager component.
var hostUrl = http://localhost:62870/;
ajaxSettings: {
url: hostUrl + 'api/AzureProvider/AzureFileOperations',
downloadUrl: hostUrl +'api/AzureProvider/AzureDownload'
}
To perform upload operation, initialize the uploadUrl
property in ajaxSettings of the File Manager component.
var hostUrl = http://localhost:62870/;
ajaxSettings: {
url: hostUrl + 'api/AzureProvider/AzureFileOperations',
uploadUrl: hostUrl +'api/AzureProvider/AzureUpload'
}
To perform image preview support in the File Manager component, initialize the getImageUrl
property in ajaxSettings of the File Manager component.
var hostUrl = http://localhost:62870/;
ajaxSettings: {
url: hostUrl + 'api/AzureProvider/AzureFileOperations',
getImageUrl: hostUrl +'api/AzureProvider/AzureGetImage'
}
The FileManager will be rendered as the following.
Product support is available for through following mediums.
- Creating incident in Syncfusion Direct-trac support system or Community forum.
- New GitHub issue.
- Ask your query in Stack Overflow with tag
syncfusion
andej2
.
Check the license detail here.
Check the changelog here
© Copyright 2019 Syncfusion, Inc. All Rights Reserved. The Syncfusion Essential Studio license and copyright applies to this distribution.