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
#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

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

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 94 1/30/2024
1.3.6 122 1/2/2024
1.3.5 97 1/2/2024
1.3.4.1 85 1/1/2024
1.3.4 87 1/1/2024
1.3.3 90 12/29/2023
1.3.2 85 12/29/2023
1.3.1 76 12/29/2023
1.3.0 99 12/29/2023
1.2.101 155 6/22/2023
1.2.1 101 6/22/2023
1.2.0 128 6/20/2023
1.0.103 129 6/20/2023
1.0.102 112 6/20/2023
1.0.101 125 6/20/2023
1.0.10 141 6/20/2023
1.0.8 313 10/13/2022