VOOZH about

URL: https://www.nuget.org/packages/file-upload-helper/

⇱ NuGet Gallery | file-upload-helper 1.3.6.1




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.
<PackageVersion Include="file-upload-helper" Version="1.3.6.1" />
 
Directory.Packages.props
<PackageReference Include="file-upload-helper" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version 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.
#:package file-upload-helper@1.3.6.1
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=file-upload-helper&version=1.3.6.1
 
Install as a Cake Addin
#tool nuget:?package=file-upload-helper&version=1.3.6.1
 
Install as a Cake Tool
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

  1. 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

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 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 983 1/30/2024
1.3.6 284 1/2/2024
1.3.5 235 1/2/2024
1.3.4.1 252 1/1/2024
1.3.4 232 1/1/2024
1.3.3 240 12/29/2023
1.3.2 232 12/29/2023
1.3.1 274 12/29/2023
1.3.0 246 12/29/2023
1.2.101 309 6/22/2023
1.2.1 249 6/22/2023
1.2.0 279 6/20/2023
1.0.103 287 6/20/2023
1.0.102 258 6/20/2023
1.0.101 286 6/20/2023
1.0.10 288 6/20/2023
1.0.8 502 10/13/2022