DotNetBrightener.SimpleUploadService 2023.0.20

There is a newer version of this package available.
See the version list below for details.
dotnet add package DotNetBrightener.SimpleUploadService --version 2023.0.20
                    
NuGet\Install-Package DotNetBrightener.SimpleUploadService -Version 2023.0.20
                    
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="DotNetBrightener.SimpleUploadService" Version="2023.0.20" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DotNetBrightener.SimpleUploadService" Version="2023.0.20" />
                    
Directory.Packages.props
<PackageReference Include="DotNetBrightener.SimpleUploadService" />
                    
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 DotNetBrightener.SimpleUploadService --version 2023.0.20
                    
#r "nuget: DotNetBrightener.SimpleUploadService, 2023.0.20"
                    
#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 DotNetBrightener.SimpleUploadService@2023.0.20
                    
#: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=DotNetBrightener.SimpleUploadService&version=2023.0.20
                    
Install as a Cake Addin
#tool nuget:?package=DotNetBrightener.SimpleUploadService&version=2023.0.20
                    
Install as a Cake Tool

Simple Upload API for ASP.NET Application

© 2022 DotNet Brightener

Installation

Run this in command line:

dotnet add package DotNetBrightener.SimpleUploadService

Or add the following to .csproj file

<PackageReference Include="DotNetBrightener.SimpleUploadService" Version="2022.10.0" />

Usage

1. Register the service

serviceCollection.RegisterSimpleUploadService(builder => {
	// configure your upload configuration here
});

2. Upload Path

Default upload folder is {environment.ContentRootPath}/Media. For example, if you deploy the application in /app of the computer, the upload folder will be /app/Media.

You can replace the default upload folder by implementing IUploadFolderPathResolver interface and provide your own logic of determining where to store the uploaded file.

public class TenantBasedUploadPathResolver : IUploadFolderResolver 
{
    public string UploadRootPath { get; }

    public TenantBasedUploadPathResolver(IHostEnvironment hostEnvironment)
    {
        this.UploadRootPath = hostEnvironment.ContentRootPath;
    }

    public Task<string> ResolveUploadPath(string uploadPath)
    {
        return Task.FromResult(uploadPath.Replace('/', Path.DirectorySeparatorChar)
                                         .Replace('\\', Path.DirectorySeparatorChar));
    }

}

Resizing image when upload

Implement your own logic for resizing photos by deriving the IImageResizer interface. Then you need to register it by


Extend API with IUploadServiceProvider

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  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 (3)

Showing the top 3 NuGet packages that depend on DotNetBrightener.SimpleUploadService:

Package Downloads
DotNetBrightener.UploadService.AzureBlobStorage

Azure Blob Storage Upload API for ASP.NET Core Applications

DotNetBrightener.UploadService.ImageOptimizer

An Image Resizer used with DotNetBrightener.SimpleUploadService package. Migrated to SkiaSharp for improved security and performance.

DotNetBrightener.UploadService.S3Storage

S3-Compatible Storage Upload Service Provider for ASP.NET Core Applications. Supports AWS S3, Digital Ocean Spaces, Wasabi, MinIO, Backblaze B2, and other S3-compatible storage providers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.0.1-preview-notificati... 245 12/6/2025
2026.0.1-preview-737 93 3/9/2026
2026.0.1-preview-734 114 2/23/2026
2026.0.1-preview-733 108 2/6/2026
2026.0.1-preview-731 135 2/3/2026
2026.0.1-preview-728 126 1/20/2026
2026.0.1-preview-723 111 1/15/2026
2026.0.1-preview-721 115 1/15/2026
2026.0.1-preview-717 138 1/5/2026
2026.0.1-preview-713 481 12/10/2025
2026.0.1-preview-700 258 12/7/2025
2026.0.1-preview-689 143 12/6/2025
2026.0.1-preview-676 711 12/2/2025
2026.0.1-preview-671 155 11/29/2025
2026.0.1-preview-670 146 11/29/2025
2026.0.1-preview-669 150 11/29/2025
2025.0.10 236 11/25/2025
2023.0.20 268 11/27/2023
Loading failed