microservices - Could not find file '/app/"Dynamic path which user selects picture"' in .net core web api
问题描述
FileInfo fInfo = new FileInfo(sPath);long numBytes = fInfo.Length;
string path=@User.Profilepicture;string imgPath = **System.IO.File.ReadAllText(User.Profilepicture);**
byte[] byteData = System.IO.File.ReadAllBytes(imgPath);
System.IO.FileNotFoundException: Could not find file '/app/@D:\projectpic.png'. File name: '/app/@D:\projectpic.png'
Unable to access the selected file
解决方案
推荐阅读
- list - 如何使 flexbox 与 listis 一起工作
- reporting-services - 从两个不同的数据集获取总数到第三个不同的 tablix ssrs
- c++ - 当转换为无符号时,标准说“最小的无符号整数”是结果。为什么“最小”在这里很重要?
- python - 检查熊猫数据框中两列之间的日期和时间
- java - 无法在 Spring Java bean 中注入模拟?
- java - 如何仅从 Point 类中获取 x 和 y
- python - 在 Google Colab 中打开 csv 文件时出现 NaN
- javascript - 删除您没有引用的事件侦听器
- css - 在 Bootstrap 中将图像移动到卡片的右侧
- java - 为什么“fileInputStream.read()”的值被改变了?