diff --git a/README.md b/README.md index 4d5f36884..3be7051b4 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@

Blogifier

- Blogifier is an open-source publishing platform written in ASP.NET and Blazor WebAssembly.
- Right now with Blogifier, you can make a personal blog, and more features are under development.

+ Blogifier is self hosted open source publishing platform written in ASP.NET and Blazor WebAssembly.
+ Right now Blogifier can be used as a personal or group blog, and more features are under development.

Official Website »    Live Demo » @@ -21,12 +21,7 @@



-> **Blogifier is under development**
-Code in the main branch is under development and some features are not yet implemented and may not work as expected. -If you are looking for a stable application, please use [latest release](https://github.com/blogifierdotnet/Blogifier/releases). -The latest stable source code is in the [master branch](https://github.com/blogifierdotnet/Blogifier/tree/5c9bab69788a1f7a0bd82c6a864e159eff5b1b72). Please note that newest code uses Blazor Web Assembly and not compatible with previous versions. -

## Installation This version is built and compiled, and ready to use: diff --git a/src/Blogifier.Admin/Components/Blog/CategoriesComponent.razor b/src/Blogifier.Admin/Components/Blog/CategoriesComponent.razor index 40570b306..425918bed 100644 --- a/src/Blogifier.Admin/Components/Blog/CategoriesComponent.razor +++ b/src/Blogifier.Admin/Components/Blog/CategoriesComponent.razor @@ -1,7 +1,15 @@ @inject HttpClient _http @inject IStringLocalizer _localizer
@if (PostCategories != null) @@ -16,7 +24,7 @@
} } - + @code { diff --git a/src/Blogifier.Core/Blogifier.Core.csproj b/src/Blogifier.Core/Blogifier.Core.csproj index 9c8773bc8..7d45e61bd 100644 --- a/src/Blogifier.Core/Blogifier.Core.csproj +++ b/src/Blogifier.Core/Blogifier.Core.csproj @@ -2,9 +2,9 @@ net6.0 - 2.9.1.5 + 2.9.2.0 blogifierdotnet - Blogifier is an open-source publishing platform Written in .NET 5.0 and Blazor WebAssembly. + Blogifier is an open-source publishing platform Written in ASP.NET and Blazor WebAssembly. Blogifier.Net https://blogifier.net https://github.com/blogifierdotnet/Blogifier diff --git a/src/Blogifier.Core/Providers/StorageProvider.cs b/src/Blogifier.Core/Providers/StorageProvider.cs index f60e86a39..33989cfc5 100644 --- a/src/Blogifier.Core/Providers/StorageProvider.cs +++ b/src/Blogifier.Core/Providers/StorageProvider.cs @@ -107,10 +107,21 @@ public async Task UploadFormFile(IFormFile file, string path = "") Path.Combine(_storageRoot, fileName) : Path.Combine(_storageRoot, path + _slash + fileName); - using (var fileStream = new FileStream(filePath, FileMode.Create)) + Serilog.Log.Information($"Storage root: {_storageRoot}"); + Serilog.Log.Information($"Uploading file: {filePath}"); + try + { + using (var fileStream = new FileStream(filePath, FileMode.Create)) + { + await file.CopyToAsync(fileStream); + Serilog.Log.Information($"Uploaded file: {filePath}"); + } + } + catch (Exception ex) { - await file.CopyToAsync(fileStream); + Serilog.Log.Error($"Error uploading file: {ex.Message}"); } + return true; } @@ -178,19 +189,28 @@ private string ContentRoot string testsDirectory = $"tests{_slash}Blogifier.Tests"; string appDirectory = $"src{_slash}Blogifier"; + Serilog.Log.Information($"Current directory path: {path}"); + // development unit test run if (path.LastIndexOf(testsDirectory) > 0) { path = path.Substring(0, path.LastIndexOf(testsDirectory)); + Serilog.Log.Information($"Unit test path: {path}src{_slash}Blogifier"); return $"{path}src{_slash}Blogifier"; } - // development debug run + // this needed to make sure we have correct data directory + // when running in debug mode in Visual Studio + // so instead of debug (src/Blogifier/bin/Debug..) + // will be used src/Blogifier/wwwroot/data + // !! this can mess up installs that have "src/Blogifier" in the path !! if (path.LastIndexOf(appDirectory) > 0) { path = path.Substring(0, path.LastIndexOf(appDirectory)); + Serilog.Log.Information($"Development debug path: {path}src{_slash}Blogifier"); return $"{path}src{_slash}Blogifier"; } + Serilog.Log.Information($"Final path: {path}"); return path; } } diff --git a/tests/Blogifier.Tests/Blogifier.Tests.csproj b/tests/Blogifier.Tests/Blogifier.Tests.csproj index a8e233faa..d0116a81f 100644 --- a/tests/Blogifier.Tests/Blogifier.Tests.csproj +++ b/tests/Blogifier.Tests/Blogifier.Tests.csproj @@ -1,17 +1,17 @@ - net5.0 + net6.0 - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all