【发布时间】:2019-07-15 10:55:29
【问题描述】:
我有一个图片上传器,可以将我的图片存储在该项目位置:
C:\Users\example\source\Workspaces\project\projectsample\Content\Files
当我尝试使用以下 URL 和代码访问此图像时,它会中断:
var fileURL = "~/Content/Files/image.png";
byte[] file = File.ReadAllBytes(fileURL);
找不到路径的一部分
我错过了什么?
编辑
通过以下方式解决:How to read existing text files without defining path 使用 AXMIM 解决方案。
【问题讨论】: