DotNetBrightener.SimpleUploadService 2024.0.1-alpha-3

This is a prerelease version of DotNetBrightener.SimpleUploadService.
There is a newer version of this package available.
See the version list below for details.
dotnet add package DotNetBrightener.SimpleUploadService --version 2024.0.1-alpha-3                
NuGet\Install-Package DotNetBrightener.SimpleUploadService -Version 2024.0.1-alpha-3                
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.1-alpha-3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetBrightener.SimpleUploadService --version 2024.0.1-alpha-3                
#r "nuget: DotNetBrightener.SimpleUploadService, 2024.0.1-alpha-3"                
#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.1-alpha-3&prerelease

// Install DotNetBrightener.SimpleUploadService as a Cake Tool
#tool nuget:?package=DotNetBrightener.SimpleUploadService&version=2024.0.1-alpha-3&prerelease                

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 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 (2)

Showing the top 2 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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2025.0.1-rc-243301701 63 11/25/2024
2024.0.14.6 78 11/25/2024
2024.0.14.6-rc-243031001 138 10/29/2024
2024.0.14.6-rc-243030701 89 10/29/2024
2024.0.14.6-rc-242840501 82 10/10/2024
2024.0.14.6-rc-242820305 83 10/8/2024
2024.0.14.6-rc-242771401 154 10/3/2024
2024.0.14.6-rc-242770501 88 10/3/2024
2024.0.14.6-rc-242770201 93 10/3/2024
2024.0.14.6-rc-242761801 85 10/2/2024
2024.0.14.6-rc-242761601 89 10/2/2024
2024.0.14.6-rc-242761501 76 10/2/2024
2024.0.14.6-rc-242761401 84 10/2/2024
2024.0.14.6-rc-242760701 96 10/2/2024
2024.0.14.6-rc-242751002 77 10/1/2024
2024.0.14.6-rc-242750901 99 10/1/2024
2024.0.14.6-rc-242750502 92 10/1/2024
2024.0.14.6-rc-242750201 96 10/1/2024
2024.0.14.6-rc-242741501 75 9/30/2024
2024.0.14.6-rc-242730701 105 9/29/2024
2024.0.14.6-preview-2730501 78 9/29/2024
2024.0.14.6-preview-2701501 103 9/26/2024
2024.0.14.6-preview-2620901 135 9/18/2024
2024.0.14.6-preview-2570701 109 9/13/2024
2024.0.14.6-preview-2510703 135 9/7/2024
2024.0.14.6-preview-2480501 115 9/4/2024
2024.0.14.6-preview-2430401 129 8/30/2024
2024.0.14.6-preview-242730701 74 9/29/2024
2024.0.14.6-preview-2421703 103 8/29/2024
2024.0.14.6-preview-2421701 97 8/29/2024
2024.0.14.6-preview-2420901 90 8/29/2024
2024.0.14.6-preview-2390101 116 8/26/2024
2024.0.14.6-preview-2381603 124 8/25/2024
2024.0.14.6-preview-2341601 147 8/21/2024
2024.0.14.6-preview-2321602 110 8/20/2024
2024.0.14.6-preview-2190801 123 8/6/2024
2024.0.14.6-preview-2041501 83 7/22/2024
2024.0.14.6-preview-1920603 147 7/10/2024
2024.0.14.6-preview-1920301 87 7/10/2024
2024.0.14.6-preview-1911302 113 7/9/2024
2024.0.14.6-preview-1901001 118 7/8/2024
2024.0.14.6-preview-1900901 109 7/8/2024
2024.0.14.6-preview-1900801 103 7/8/2024
2024.0.14.6-preview-1860304 117 7/4/2024
2024.0.14.5 178 7/1/2024
2024.0.14.5-preview-1811601 107 6/29/2024
2024.0.14.5-preview-1810501 123 6/29/2024
2024.0.14.5-preview-180132 116 6/28/2024
2024.0.14.5-preview-180131 108 6/28/2024
2024.0.14.5-preview-180121 104 6/28/2024
2024.0.14.4 128 6/27/2024
2024.0.14.4-preview-7 109 6/27/2024
2024.0.14.3 123 6/21/2024
2024.0.14.1 115 6/6/2024
2024.0.14.1-preview 95 6/6/2024
2024.0.14-preview-1 91 6/6/2024
2024.0.13.8-preview 98 6/6/2024
2024.0.13.1-preview-0146 96 6/6/2024
2024.0.12.15803-preview-03 107 6/6/2024
2024.0.12.15608 115 6/4/2024
2024.0.12.15515 188 6/3/2024
2024.0.12.15220 98 5/31/2024
2024.0.12.15220-alpha31-240... 91 5/31/2024
2024.0.12.14911 141 5/28/2024
2024.0.12.14910-alpha28-240... 105 5/28/2024
2024.0.12.14823 118 5/27/2024
2024.0.12.14522-alpha7-2405... 111 5/24/2024
2024.0.12.14514-alpha6-2405... 114 5/24/2024
2024.0.12.14511 134 5/24/2024
2024.0.12.14314 140 5/22/2024
2024.0.12.14114 128 5/20/2024
2024.0.12.12815 168 5/7/2024
2024.0.12.12814 143 5/7/2024
2024.0.12.12721 152 5/6/2024
2024.0.12.12702 140 5/5/2024
2024.0.12.12622 144 5/5/2024
2024.0.12.12514 121 5/4/2024
2024.0.12.12512 124 5/4/2024
2024.0.12.12510 134 5/4/2024
2024.0.12.12420 110 5/3/2024
2024.0.12.12319 86 5/2/2024
2024.0.12.12319-rc-2405021801 67 5/2/2024
2024.0.12.12318 78 5/2/2024
2024.0.12.12215 119 5/1/2024
2024.0.12.12011 113 4/29/2024
2024.0.12.11720 129 4/26/2024
2024.0.12.11719 128 4/26/2024
2024.0.12.11621 131 4/25/2024
2024.0.12.11523 125 4/24/2024
2024.0.12.11522 134 4/24/2024
2024.0.12.11417 136 4/23/2024
2024.0.12.11400 134 4/22/2024
2024.0.12.11316 130 4/22/2024
2024.0.11.10220 128 4/11/2024
2024.0.11.10120 118 4/10/2024
2024.0.11.10119 113 4/10/2024
2024.0.11.10115 122 4/10/2024
2024.0.11.9914 158 4/8/2024
2024.0.11.9901 138 4/7/2024
2024.0.11.9823 138 4/7/2024
2024.0.11.9401 134 4/2/2024
2024.0.11.9301 136 4/1/2024
2024.0.11.9206 119 3/31/2024
2024.0.11.9205 93 3/31/2024
2024.0.11.8200 146 3/21/2024
2024.0.11.8122 117 3/21/2024
2024.0.11.8120 134 3/21/2024
2024.0.11.7320 177 3/13/2024
2024.0.11.7316 136 3/13/2024
2024.0.11.7310 130 3/13/2024
2024.0.11 118 3/13/2024
2024.0.10 159 3/3/2024
2024.0.9 155 2/27/2024
2024.0.8 181 2/1/2024
2024.0.7 134 1/26/2024
2024.0.6 128 1/25/2024
2024.0.5 120 1/24/2024
2024.0.4 119 1/24/2024
2024.0.3 140 1/22/2024
2024.0.2 199 1/10/2024
2024.0.1 133 1/9/2024
2024.0.1-alpha-3 106 1/9/2024
2024.0.1-alpha-2 116 1/9/2024
2024.0.1-alpha-1 134 1/3/2024
2024.0.0 187 12/26/2023
2023.0.27 138 12/21/2023
2023.0.26 129 12/21/2023
2023.0.25 162 12/11/2023
2023.0.24 173 12/8/2023
2023.0.23 148 12/6/2023
2023.0.21 174 12/4/2023
2023.0.20 179 11/27/2023
2023.0.19 164 11/20/2023
2023.0.18 195 10/25/2023
2023.0.17 216 10/22/2023
2023.0.16 180 10/16/2023
2023.0.16-alpha-1 120 10/16/2023
2023.0.15 188 10/14/2023
2023.0.14 145 10/14/2023
2023.0.13 156 10/14/2023
2023.0.12 160 10/14/2023
2023.0.11 139 10/10/2023
2023.0.10 146 10/9/2023
2023.0.9 183 8/16/2023
2023.0.8 168 8/15/2023
2023.0.8-alpha-2 273 5/31/2023
2023.0.7 163 5/12/2023
2023.0.6 216 5/10/2023
2023.0.5 175 5/7/2023
2023.0.4 211 4/22/2023
2023.0.3 236 4/19/2023
2023.0.2 228 4/6/2023
2023.0.1 232 3/13/2023
2022.11.1 359 11/12/2022
2022.11.0 348 11/7/2022
2022.10.0 366 10/28/2022