file-upload-helper
1.3.6.1
dotnet add package file-upload-helper --version 1.3.6.1
NuGet\Install-Package file-upload-helper -Version 1.3.6.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="file-upload-helper" Version="1.3.6.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add file-upload-helper --version 1.3.6.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: file-upload-helper, 1.3.6.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install file-upload-helper as a Cake Addin #addin nuget:?package=file-upload-helper&version=1.3.6.1 // Install file-upload-helper as a Cake Tool #tool nuget:?package=file-upload-helper&version=1.3.6.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FILE-UPLOAD-HELPER
Welcome to the file-upload-helper Documentation!
Added Features
The file-upload-helper now supports dependency injection with strategies for various cloud providers:
- AWS S3:
AddFileWithAWSS3Strategy
- Azure Blob Storage:
AddFileWithAzureBlobStrategy
- Google Firebase Storage:
AddFileWithFirebaseStorageStrategy
- Local File System:
AddFileWithLocalFileSystemStrategy
file-upload-helper accelerates .Net development by providing functionalities such as:
- File uploads to different servers and cloud providers.
- Support for AWS S3, Azure Blob Storage, and Firebase Cloud Storage.
- Writing files to the server's
wwwroot
directory/filesystem.
Usage
Add the package to your project via nuget.org or use the commands:
- .NET CLI:
dotnet add package file-upload-helper --version 1.3.6
- Package Manager:
Install-Package file-upload-helper -Version 1.3.6
- .NET CLI:
Inject IUploadHelperStrategy
public class Demo
{
private readonly IUploadHelperStrategy strategy;
public Demo(IUploadHelperStrategy strategy){
this.strategy = strategy
}
strategy.PutAsync() takes file(IFormFile), directory/path and cancelatioToken and returns uploaded filename/download url.
strategy.RemoveAsync() takes filename to be deleted and directory/path returns true if deletion was successful
}
Set Up Desired Strategy Through DI(do not forget to set up or errors will the thrown)
var builder = WebApplication.CreateBuilder(args);
- To use with AWS S3
builder.Services.AddFileWithAWSS3trategy(new AWSS3Credentials());
Also support the configuration of notification lambda to be triggered by this Bucket events for S3 operation
builder.Services.AddFileWithAWSS3trategy(new AWSS3Credentials(), configure =>
{
configure.LambdaFunctionConfigurations = new List<LambdaFunctionConfiguration>{
new LambdaFunctionConfiguration{
Id = "lambda",
Events = new List<EventType>{"s3:ObjectCreated:Put"},
FunctionArn = builder.Configuration["AWS_LAMBDA_FUNCTION_ARN"]
}
};
});
-To Use with Firebase storage
builder.Services.AddFileWithAFirebaseStorageStrategy(new FirebaseStorageCredentials());
-To Use with Azure Blob storage
builder.Services.AddFileWithAZureBlobStrategy(new AzureCredentials());
-To Use With Local FileSysyem
builder.Services.AddFileWithLocalFileSystemStrategy(builder.Environment);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- AWSSDK.S3 (>= 3.7.304.13)
- Azure.Storage.Blobs (>= 12.13.1)
- Firebase.Auth (>= 1.0.0)
- FirebaseStorage.net (>= 1.0.3)
- Microsoft.AspNetCore.Hosting (>= 2.2.7)
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Http.Features (>= 5.0.17)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.3.6.1 | 137 | 1/30/2024 |
1.3.6 | 158 | 1/2/2024 |
1.3.5 | 124 | 1/2/2024 |
1.3.4.1 | 113 | 1/1/2024 |
1.3.4 | 113 | 1/1/2024 |
1.3.3 | 117 | 12/29/2023 |
1.3.2 | 111 | 12/29/2023 |
1.3.1 | 118 | 12/29/2023 |
1.3.0 | 125 | 12/29/2023 |
1.2.101 | 188 | 6/22/2023 |
1.2.1 | 129 | 6/22/2023 |
1.2.0 | 151 | 6/20/2023 |
1.0.103 | 156 | 6/20/2023 |
1.0.102 | 141 | 6/20/2023 |
1.0.101 | 150 | 6/20/2023 |
1.0.10 | 167 | 6/20/2023 |
1.0.8 | 342 | 10/13/2022 |