根据文件url如何实现将文件读入byte[] buffer中
根据文件url怎么实现将文件读入byte[] buffer中?根据文件url怎么实现将文件读入byte[] buffer中?知道的大
根据文件url怎么实现将文件读入byte[] buffer中?
根据文件url怎么实现将文件读入byte[] buffer中?
知道的大神,赶紧指条明路吧
[解决办法]
就是本地下载网上文件
[解决办法]webclient直接down为stream
[解决办法] byte[] photo_byte = null;
//strFile
using (FileStream fs = new FileStream(strFile, FileMode.Open, FileAccess.Read))
{
using (BinaryReader br = new BinaryReader(fs))
{
photo_byte = br.ReadBytes((int)fs.Length);
}
[解决办法]DownloadData("");返回byte[] 没有返回stream的吧。用webclient大一点文件会超时,有没其他的方法?
[解决办法] string url = "文件地址";
WebClient wb = new System.Net.WebClient();
var photo_byte = wb.DownloadData(url);
[解决办法]FileStream 读的是本地文件路径。我需要http路径。
[解决办法]我用的就是这个,1M左右文件正常,大一点就超时了