From 8845f90cd3adc287b440e72a274c2d4af5645377 Mon Sep 17 00:00:00 2001 From: yanghongwei Date: Fri, 4 Apr 2025 22:01:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=8A=A0=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controllers/UploadController.cs | 2 +- Program.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Controllers/UploadController.cs b/Controllers/UploadController.cs index 0328ceb..8c0fa32 100644 --- a/Controllers/UploadController.cs +++ b/Controllers/UploadController.cs @@ -55,7 +55,7 @@ namespace LY.App.Controllers { file.CopyTo(stream); } - result.data = $"/{uploadPath}/{fileName}"; + result.data = $"/api/{uploadPath}/{fileName}"; result.code = 0; return Ok(result); } diff --git a/Program.cs b/Program.cs index 9f6a947..85066d1 100644 --- a/Program.cs +++ b/Program.cs @@ -100,7 +100,7 @@ await device?.Init(); app.UseStaticFiles(new StaticFileOptions() { FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "Img")), - RequestPath = "/upload" + RequestPath = "/api/upload" }); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment())