图片加前缀
This commit is contained in:
parent
0954cb5738
commit
8845f90cd3
|
|
@ -55,7 +55,7 @@ namespace LY.App.Controllers
|
||||||
{
|
{
|
||||||
file.CopyTo(stream);
|
file.CopyTo(stream);
|
||||||
}
|
}
|
||||||
result.data = $"/{uploadPath}/{fileName}";
|
result.data = $"/api/{uploadPath}/{fileName}";
|
||||||
result.code = 0;
|
result.code = 0;
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ await device?.Init();
|
||||||
app.UseStaticFiles(new StaticFileOptions()
|
app.UseStaticFiles(new StaticFileOptions()
|
||||||
{
|
{
|
||||||
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "Img")),
|
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "Img")),
|
||||||
RequestPath = "/upload"
|
RequestPath = "/api/upload"
|
||||||
});
|
});
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue