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())