s3 erweiterung
All checks were successful
Build & Deploy PLDpro.Web Test to 192.168.1.100 / build-and-deploy (push) Successful in 1m2s

This commit is contained in:
2026-01-24 21:15:18 +01:00
parent c72f6612fc
commit 6008c43fec
3 changed files with 19 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
@page "/storage"
@inject HttpClient Http
@inject IHttpClientFactory HttpFactory
@inject NavigationManager Nav
@using System.Net.Http.Json
@using Pldpro.Web.Models
@@ -73,8 +74,16 @@
private string newBucketName = "";
private const long StreamLimit = 512L * 1024 * 1024; // 512 MB (Program.cs erhöht Multipart-Limit)
protected override async Task OnInitializedAsync()
=> await LoadBuckets();
private HttpClient? Http;
protected override Task OnInitializedAsync()
{
Http = HttpFactory.CreateClient();
Http.BaseAddress = new Uri(Nav.BaseUri); // für relative URLs wie "/api/storage/..."
return LoadBuckets();
}
private async Task LoadBuckets()
{

View File

@@ -11,6 +11,7 @@ using System.Net.NetworkInformation;
using System.Runtime.Intrinsics.Arm;
using static MudBlazor.CategoryTypes;
using static MudBlazor.Colors;
using System.Net.Http;
var builder = WebApplication.CreateBuilder(args);
@@ -23,6 +24,10 @@ builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
// HttpClient-Fabrik für serverseitige Komponenten
builder.Services.AddHttpClient();
// --- S3 / RustFS Settings binding ---
builder.Services.Configure<S3Settings>(builder.Configuration.GetSection("S3"));

View File

@@ -8,8 +8,8 @@
"AllowedHosts": "*",
"S3": {
"ServiceURL": "http://192.168.1.102:9000",
"AccessKey": "your-access-key",
"SecretKey": "your-secret-key",
"AccessKey": "4ex1dhvyAqin58PT7CBQ",
"SecretKey": "6QKaqIjpUWLJBYXnHwgkFlA1N8irtyuf4MRxhcGb",
"UseHttp": true,
"ForcePathStyle": true,
"DefaultBucketPrefix": "pld-" // optional