图片加前缀

This commit is contained in:
yanghongwei 2025-04-04 22:01:40 +08:00
parent 0954cb5738
commit 8845f90cd3
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

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