我有一个API项目,其中我使用Razor模板生成pdf
这是项目结构
我在Staticfiles
中包括了Startup.cs
赞
app.UseStaticfiles();
app.UseStaticfiles(new StaticfileOptions()
{
FileProvider = new PhysicalFileProvider(
Path.Combine(Directory.getcurrentDirectory(),@"Images")),RequestPath = new PathString("/Staticfiles")
});
在剃刀模板中,我尝试像这样使用它
<img class="logo"
height="80"
src="@ViewData["BaseUrl"]/Images/propertyLogo-dark.png"/>
但是在pdf图像中不可见,就像在此路径下不可见。
我的问题在哪里?