s3 erweiterung
All checks were successful
Build & Deploy PLDpro.Web Test to 192.168.1.100 / build-and-deploy (push) Successful in 1m2s
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:
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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"));
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user