DotNetBrightener.SimpleUploadService
2024.0.14.6-preview-1860304
dotnet add package DotNetBrightener.SimpleUploadService --version 2024.0.14.6-preview-1860304
NuGet\Install-Package DotNetBrightener.SimpleUploadService -Version 2024.0.14.6-preview-1860304
<PackageReference Include="DotNetBrightener.SimpleUploadService" Version="2024.0.14.6-preview-1860304" />
paket add DotNetBrightener.SimpleUploadService --version 2024.0.14.6-preview-1860304
#r "nuget: DotNetBrightener.SimpleUploadService, 2024.0.14.6-preview-1860304"
// Install DotNetBrightener.SimpleUploadService as a Cake Addin
#addin nuget:?package=DotNetBrightener.SimpleUploadService&version=2024.0.14.6-preview-1860304&prerelease
// Install DotNetBrightener.SimpleUploadService as a Cake Tool
#tool nuget:?package=DotNetBrightener.SimpleUploadService&version=2024.0.14.6-preview-1860304&prerelease
Simple Upload API for ASP.NET Application
© 2024 DotNet Brightener
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 | Versions 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. |
-
net8.0
- DotNetBrightener.Plugins.EventPubSub (>= 2024.0.14.6-preview-1860304)
- Newtonsoft.Json (>= 13.0.3)
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-1860304 | 30 | 7/4/2024 |
2024.0.14.5 | 107 | 7/1/2024 |
2024.0.14.5-preview-1811601 | 63 | 6/29/2024 |
2024.0.14.5-preview-1810501 | 83 | 6/29/2024 |
2024.0.14.5-preview-180132 | 80 | 6/28/2024 |
2024.0.14.5-preview-180131 | 71 | 6/28/2024 |
2024.0.14.5-preview-180121 | 62 | 6/28/2024 |
2024.0.14.4 | 89 | 6/27/2024 |
2024.0.14.4-preview-7 | 67 | 6/27/2024 |
2024.0.14.3 | 83 | 6/21/2024 |
2024.0.14.1 | 74 | 6/6/2024 |
2024.0.14.1-preview | 61 | 6/6/2024 |
2024.0.14-preview-1 | 60 | 6/6/2024 |
2024.0.13.8-preview | 68 | 6/6/2024 |
2024.0.13.1-preview-0146 | 63 | 6/6/2024 |
2024.0.12.15803-preview-03 | 69 | 6/6/2024 |
2024.0.12.15608 | 75 | 6/4/2024 |
2024.0.12.15515 | 148 | 6/3/2024 |
2024.0.12.15220 | 65 | 5/31/2024 |
2024.0.12.15220-alpha31-240... | 55 | 5/31/2024 |
2024.0.12.14911 | 105 | 5/28/2024 |
2024.0.12.14910-alpha28-240... | 69 | 5/28/2024 |
2024.0.12.14823 | 78 | 5/27/2024 |
2024.0.12.14522-alpha7-2405... | 79 | 5/24/2024 |
2024.0.12.14514-alpha6-2405... | 77 | 5/24/2024 |
2024.0.12.14511 | 97 | 5/24/2024 |
2024.0.12.14314 | 105 | 5/22/2024 |
2024.0.12.14114 | 90 | 5/20/2024 |
2024.0.12.12815 | 131 | 5/7/2024 |
2024.0.12.12814 | 101 | 5/7/2024 |
2024.0.12.12721 | 116 | 5/6/2024 |
2024.0.12.12702 | 102 | 5/5/2024 |
2024.0.12.12622 | 112 | 5/5/2024 |
2024.0.12.12514 | 87 | 5/4/2024 |
2024.0.12.12512 | 91 | 5/4/2024 |
2024.0.12.12510 | 100 | 5/4/2024 |
2024.0.12.12420 | 75 | 5/3/2024 |
2024.0.12.12319 | 50 | 5/2/2024 |
2024.0.12.12319-rc-2405021801 | 36 | 5/2/2024 |
2024.0.12.12318 | 44 | 5/2/2024 |
2024.0.12.12215 | 85 | 5/1/2024 |
2024.0.12.12011 | 83 | 4/29/2024 |
2024.0.12.11720 | 99 | 4/26/2024 |
2024.0.12.11719 | 91 | 4/26/2024 |
2024.0.12.11621 | 97 | 4/25/2024 |
2024.0.12.11523 | 88 | 4/24/2024 |
2024.0.12.11522 | 97 | 4/24/2024 |
2024.0.12.11417 | 100 | 4/23/2024 |
2024.0.12.11400 | 95 | 4/22/2024 |
2024.0.12.11316 | 94 | 4/22/2024 |
2024.0.11.10220 | 92 | 4/11/2024 |
2024.0.11.10120 | 85 | 4/10/2024 |
2024.0.11.10119 | 81 | 4/10/2024 |
2024.0.11.10115 | 87 | 4/10/2024 |
2024.0.11.9914 | 121 | 4/8/2024 |
2024.0.11.9901 | 89 | 4/7/2024 |
2024.0.11.9823 | 105 | 4/7/2024 |
2024.0.11.9401 | 101 | 4/2/2024 |
2024.0.11.9301 | 104 | 4/1/2024 |
2024.0.11.9206 | 83 | 3/31/2024 |
2024.0.11.9205 | 70 | 3/31/2024 |
2024.0.11.8200 | 110 | 3/21/2024 |
2024.0.11.8122 | 84 | 3/21/2024 |
2024.0.11.8120 | 96 | 3/21/2024 |
2024.0.11.7320 | 141 | 3/13/2024 |
2024.0.11.7316 | 103 | 3/13/2024 |
2024.0.11.7310 | 93 | 3/13/2024 |
2024.0.11 | 91 | 3/13/2024 |
2024.0.10 | 115 | 3/3/2024 |
2024.0.9 | 125 | 2/27/2024 |
2024.0.8 | 146 | 2/1/2024 |
2024.0.7 | 105 | 1/26/2024 |
2024.0.6 | 95 | 1/25/2024 |
2024.0.5 | 90 | 1/24/2024 |
2024.0.4 | 87 | 1/24/2024 |
2024.0.3 | 104 | 1/22/2024 |
2024.0.2 | 162 | 1/10/2024 |
2024.0.1 | 105 | 1/9/2024 |
2024.0.1-alpha-3 | 71 | 1/9/2024 |
2024.0.1-alpha-2 | 91 | 1/9/2024 |
2024.0.1-alpha-1 | 99 | 1/3/2024 |
2024.0.0 | 148 | 12/26/2023 |
2023.0.27 | 101 | 12/21/2023 |
2023.0.26 | 99 | 12/21/2023 |
2023.0.25 | 126 | 12/11/2023 |
2023.0.24 | 135 | 12/8/2023 |
2023.0.23 | 113 | 12/6/2023 |
2023.0.21 | 130 | 12/4/2023 |
2023.0.20 | 151 | 11/27/2023 |
2023.0.19 | 132 | 11/20/2023 |
2023.0.18 | 154 | 10/25/2023 |
2023.0.17 | 176 | 10/22/2023 |
2023.0.16 | 143 | 10/16/2023 |
2023.0.16-alpha-1 | 91 | 10/16/2023 |
2023.0.15 | 149 | 10/14/2023 |
2023.0.14 | 106 | 10/14/2023 |
2023.0.13 | 122 | 10/14/2023 |
2023.0.12 | 125 | 10/14/2023 |
2023.0.11 | 105 | 10/10/2023 |
2023.0.10 | 115 | 10/9/2023 |
2023.0.9 | 149 | 8/16/2023 |
2023.0.8 | 135 | 8/15/2023 |
2023.0.8-alpha-2 | 242 | 5/31/2023 |
2023.0.7 | 129 | 5/12/2023 |
2023.0.6 | 177 | 5/10/2023 |
2023.0.5 | 139 | 5/7/2023 |
2023.0.4 | 172 | 4/22/2023 |
2023.0.3 | 202 | 4/19/2023 |
2023.0.2 | 199 | 4/6/2023 |
2023.0.1 | 207 | 3/13/2023 |
2022.11.1 | 333 | 11/12/2022 |
2022.11.0 | 319 | 11/7/2022 |
2022.10.0 | 341 | 10/28/2022 |