问题描述
我在服务器端项目中有一个静态文件的文件夹来上传图像,当我发布该项目时,它给了我这个错误:
This is where I have the static files folder
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(
Path.Combine(Directory.GetCurrentDirectory(),"upload")),RequestPath = "/upload"
});
我希望你们中的一些人能帮助我。
解决方法
您只需要在应用程序文件夹中自己创建upload
文件夹即可。