DotNetBrightener.SimpleUploadService 2023.0.8

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

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

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. 
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
2024.0.14.6-preview-2620901 59 9/18/2024
2024.0.14.6-preview-2570701 78 9/13/2024
2024.0.14.6-preview-2510703 87 9/7/2024
2024.0.14.6-preview-2480501 77 9/4/2024
2024.0.14.6-preview-2430401 91 8/30/2024
2024.0.14.6-preview-2421703 62 8/29/2024
2024.0.14.6-preview-2421701 66 8/29/2024
2024.0.14.6-preview-2420901 66 8/29/2024
2024.0.14.6-preview-2390101 88 8/26/2024
2024.0.14.6-preview-2381603 92 8/25/2024
2024.0.14.6-preview-2341601 115 8/21/2024
2024.0.14.6-preview-2321602 83 8/20/2024
2024.0.14.6-preview-2190801 92 8/6/2024
2024.0.14.6-preview-2041501 67 7/22/2024
2024.0.14.6-preview-1920603 118 7/10/2024
2024.0.14.6-preview-1920301 58 7/10/2024
2024.0.14.6-preview-1911302 85 7/9/2024
2024.0.14.6-preview-1901001 92 7/8/2024
2024.0.14.6-preview-1900901 78 7/8/2024
2024.0.14.6-preview-1900801 77 7/8/2024
2024.0.14.6-preview-1860304 86 7/4/2024
2024.0.14.5 143 7/1/2024
2024.0.14.5-preview-1811601 77 6/29/2024
2024.0.14.5-preview-1810501 96 6/29/2024
2024.0.14.5-preview-180132 91 6/28/2024
2024.0.14.5-preview-180131 82 6/28/2024
2024.0.14.5-preview-180121 73 6/28/2024
2024.0.14.4 101 6/27/2024
2024.0.14.4-preview-7 78 6/27/2024
2024.0.14.3 95 6/21/2024
2024.0.14.1 84 6/6/2024
2024.0.14.1-preview 70 6/6/2024
2024.0.14-preview-1 67 6/6/2024
2024.0.13.8-preview 76 6/6/2024
2024.0.13.1-preview-0146 70 6/6/2024
2024.0.12.15803-preview-03 76 6/6/2024
2024.0.12.15608 85 6/4/2024
2024.0.12.15515 157 6/3/2024
2024.0.12.15220 74 5/31/2024
2024.0.12.15220-alpha31-240... 62 5/31/2024
2024.0.12.14911 114 5/28/2024
2024.0.12.14910-alpha28-240... 74 5/28/2024
2024.0.12.14823 85 5/27/2024
2024.0.12.14522-alpha7-2405... 84 5/24/2024
2024.0.12.14514-alpha6-2405... 82 5/24/2024
2024.0.12.14511 104 5/24/2024
2024.0.12.14314 110 5/22/2024
2024.0.12.14114 97 5/20/2024
2024.0.12.12815 136 5/7/2024
2024.0.12.12814 107 5/7/2024
2024.0.12.12721 121 5/6/2024
2024.0.12.12702 109 5/5/2024
2024.0.12.12622 117 5/5/2024
2024.0.12.12514 93 5/4/2024
2024.0.12.12512 96 5/4/2024
2024.0.12.12510 106 5/4/2024
2024.0.12.12420 81 5/3/2024
2024.0.12.12319 56 5/2/2024
2024.0.12.12319-rc-2405021801 40 5/2/2024
2024.0.12.12318 48 5/2/2024
2024.0.12.12215 91 5/1/2024
2024.0.12.12011 88 4/29/2024
2024.0.12.11720 103 4/26/2024
2024.0.12.11719 95 4/26/2024
2024.0.12.11621 103 4/25/2024
2024.0.12.11523 95 4/24/2024
2024.0.12.11522 104 4/24/2024
2024.0.12.11417 107 4/23/2024
2024.0.12.11400 103 4/22/2024
2024.0.12.11316 103 4/22/2024
2024.0.11.10220 99 4/11/2024
2024.0.11.10120 92 4/10/2024
2024.0.11.10119 88 4/10/2024
2024.0.11.10115 97 4/10/2024
2024.0.11.9914 128 4/8/2024
2024.0.11.9901 104 4/7/2024
2024.0.11.9823 114 4/7/2024
2024.0.11.9401 108 4/2/2024
2024.0.11.9301 111 4/1/2024
2024.0.11.9206 89 3/31/2024
2024.0.11.9205 77 3/31/2024
2024.0.11.8200 115 3/21/2024
2024.0.11.8122 94 3/21/2024
2024.0.11.8120 104 3/21/2024
2024.0.11.7320 147 3/13/2024
2024.0.11.7316 109 3/13/2024
2024.0.11.7310 99 3/13/2024
2024.0.11 97 3/13/2024
2024.0.10 123 3/3/2024
2024.0.9 129 2/27/2024
2024.0.8 153 2/1/2024
2024.0.7 109 1/26/2024
2024.0.6 101 1/25/2024
2024.0.5 95 1/24/2024
2024.0.4 93 1/24/2024
2024.0.3 111 1/22/2024
2024.0.2 170 1/10/2024
2024.0.1 112 1/9/2024
2024.0.1-alpha-3 77 1/9/2024
2024.0.1-alpha-2 96 1/9/2024
2024.0.1-alpha-1 105 1/3/2024
2024.0.0 153 12/26/2023
2023.0.27 108 12/21/2023
2023.0.26 102 12/21/2023
2023.0.25 132 12/11/2023
2023.0.24 141 12/8/2023
2023.0.23 117 12/6/2023
2023.0.21 134 12/4/2023
2023.0.20 155 11/27/2023
2023.0.19 136 11/20/2023
2023.0.18 163 10/25/2023
2023.0.17 183 10/22/2023
2023.0.16 151 10/16/2023
2023.0.16-alpha-1 98 10/16/2023
2023.0.15 157 10/14/2023
2023.0.14 113 10/14/2023
2023.0.13 130 10/14/2023
2023.0.12 134 10/14/2023
2023.0.11 112 10/10/2023
2023.0.10 123 10/9/2023
2023.0.9 154 8/16/2023
2023.0.8 139 8/15/2023
2023.0.8-alpha-2 249 5/31/2023
2023.0.7 134 5/12/2023
2023.0.6 182 5/10/2023
2023.0.5 143 5/7/2023
2023.0.4 179 4/22/2023
2023.0.3 209 4/19/2023
2023.0.2 206 4/6/2023
2023.0.1 210 3/13/2023
2022.11.1 338 11/12/2022
2022.11.0 324 11/7/2022
2022.10.0 346 10/28/2022