DotNetBrightener.SimpleUploadService 2024.0.12.12318

dotnet add package DotNetBrightener.SimpleUploadService --version 2024.0.12.12318
NuGet\Install-Package DotNetBrightener.SimpleUploadService -Version 2024.0.12.12318
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="2024.0.12.12318" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetBrightener.SimpleUploadService --version 2024.0.12.12318
#r "nuget: DotNetBrightener.SimpleUploadService, 2024.0.12.12318"
#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 DotNetBrightener.SimpleUploadService as a Cake Addin
#addin nuget:?package=DotNetBrightener.SimpleUploadService&version=2024.0.12.12318

// Install DotNetBrightener.SimpleUploadService as a Cake Tool
#tool nuget:?package=DotNetBrightener.SimpleUploadService&version=2024.0.12.12318

Simple Upload API for ASP.NET Application

© 2024 DotNet Brightener

NuGet Version

Installation

Run this in command line:

dotnet add package DotNetBrightener.SimpleUploadService

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 net8.0 is compatible.  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 (1)

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

Package Downloads
DotNetBrightener.UploadService.AzureBlobStorage

Azure Blob Storage Upload API for ASP.NET Core Applications

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2024.0.12.12318 0 5/2/2024
2024.0.12.12215 37 5/1/2024
2024.0.12.12011 75 4/29/2024
2024.0.12.11720 92 4/26/2024
2024.0.12.11719 84 4/26/2024
2024.0.12.11621 90 4/25/2024
2024.0.12.11523 81 4/24/2024
2024.0.12.11522 90 4/24/2024
2024.0.12.11417 95 4/23/2024
2024.0.12.11400 91 4/22/2024
2024.0.12.11316 90 4/22/2024
2024.0.11.10220 89 4/11/2024
2024.0.11.10120 82 4/10/2024
2024.0.11.10119 78 4/10/2024
2024.0.11.10115 84 4/10/2024
2024.0.11.9914 117 4/8/2024
2024.0.11.9901 85 4/7/2024
2024.0.11.9823 101 4/7/2024
2024.0.11.9401 97 4/2/2024
2024.0.11.9301 100 4/1/2024
2024.0.11.9206 77 3/31/2024
2024.0.11.9205 66 3/31/2024
2024.0.11.8200 105 3/21/2024
2024.0.11.8122 77 3/21/2024
2024.0.11.8120 91 3/21/2024
2024.0.11.7320 136 3/13/2024
2024.0.11.7316 98 3/13/2024
2024.0.11.7310 84 3/13/2024
2024.0.11 82 3/13/2024
2024.0.10 109 3/3/2024
2024.0.9 118 2/27/2024
2024.0.8 142 2/1/2024
2024.0.7 98 1/26/2024
2024.0.6 89 1/25/2024
2024.0.5 84 1/24/2024
2024.0.4 81 1/24/2024
2024.0.3 96 1/22/2024
2024.0.2 157 1/10/2024
2024.0.1 101 1/9/2024
2024.0.1-alpha-3 69 1/9/2024
2024.0.1-alpha-2 90 1/9/2024
2024.0.1-alpha-1 98 1/3/2024
2024.0.0 143 12/26/2023
2023.0.27 97 12/21/2023
2023.0.26 96 12/21/2023
2023.0.25 123 12/11/2023
2023.0.24 132 12/8/2023
2023.0.23 108 12/6/2023
2023.0.21 127 12/4/2023
2023.0.20 147 11/27/2023
2023.0.19 129 11/20/2023
2023.0.18 149 10/25/2023
2023.0.17 173 10/22/2023
2023.0.16 140 10/16/2023
2023.0.16-alpha-1 89 10/16/2023
2023.0.15 146 10/14/2023
2023.0.14 103 10/14/2023
2023.0.13 119 10/14/2023
2023.0.12 122 10/14/2023
2023.0.11 102 10/10/2023
2023.0.10 112 10/9/2023
2023.0.9 145 8/16/2023
2023.0.8 132 8/15/2023
2023.0.8-alpha-2 240 5/31/2023
2023.0.7 125 5/12/2023
2023.0.6 168 5/10/2023
2023.0.5 136 5/7/2023
2023.0.4 167 4/22/2023
2023.0.3 199 4/19/2023
2023.0.2 196 4/6/2023
2023.0.1 202 3/13/2023
2022.11.1 331 11/12/2022
2022.11.0 318 11/7/2022
2022.10.0 335 10/28/2022