This repository contains the Amazon S3 bucket file system provider in ASP.NET Core for the Syncfusion File Manager component.
The following actions can be performed with Amazon S3 bucket file system provider:
Actions | Description |
---|---|
Read | Reads the files from Amazon S3 bucket. |
Details | Gets the file's details like Type, Size, Location, and Modified date. |
Download | Downloads the selected file or folder from the Amazon S3 bucket. |
Upload | Uploads a file to the Amazon S3 bucket. It accepts uploaded media with the following characteristics:
|
Create | Creates a new folder. |
Delete | Deletes a folder or file. |
Copy | Copies the selected files from target. |
Move | Pastes the copied files to the desired location. |
Rename | Renames a folder or file. |
Search | Full-text queries perform linguistic searches against text data in full-text indexes by operating on words and phrases. |
To run the service, create an Amazon S3 bucket in one of the AWS Regions for accessing and storing the S3 objects as files or folders. Create an Amazon S3 account and then create S3 bucket to perform the file operations. Then, open the AmazonS3FileProvider
and register your Amazon S3 client account details like awsAccessKeyId, awsSecretAccessKey, bucketRegion, and bucketName details in RegisterAmazonS3
method to perform the file operations.
void RegisterAmazonS3(string bucketName, string awsAccessKeyId, string awsSecretAccessKey, string bucketRegion);
To run this application, clone the amazon-s3-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 following commands one after the other.
git clone https://github.com/SyncfusionExamples/amazon-s3-aspcore-file-provider
cd amazon-s3-aspcore-file-provider
To restore the NuGet package, run the following command in root folder of the application.
dotnet restore
To build the application, run the following command.
dotnet build
After successful compilation, run the following command to run the application.
dotnet run
Now, the project will be hosted in http://localhost. To ensure the Amazon-s3-service, map the following URL in your browser.
http://localhost:<port-number>/api/test
To access the basic actions such as Read, Delete, Copy, Move, Rename, Search, and Get Details of File Manager using Amazon s3 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/AmazonS3Provider/AmazonS3FileOperations'
}
To perform download operation, initialize the downloadUrl
property in ajaxSettings of the File Manager component.
var hostUrl = http://localhost:62870/;
ajaxSettings: {
url: hostUrl + 'api/AmazonS3Provider/AmazonS3FileOperations',
downloadUrl: hostUrl + 'api/AmazonS3Provider/AmazonS3Download'
}
To perform upload operation, initialize the uploadUrl
property in ajaxSettings of the File Manager component.
var hostUrl = http://localhost:62870/;
ajaxSettings: {
url: hostUrl + 'api/AmazonS3Provider/AmazonS3FileOperations',
uploadUrl: hostUrl + 'api/AmazonS3Provider/AmazonS3Upload'
}
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/AmazonS3Provider/AmazonS3FileOperations',
getImageUrl: hostUrl + 'api/AmazonS3Provider/AmazonS3GetImage'
}
The FileManager will be rendered as the following.
Product support is available through the 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 details here.
Check the changelog here
© Copyright 2020 Syncfusion, Inc. All Rights Reserved. The Syncfusion Essential Studio license and copyright applies to this distribution.