0
A
回答
0
0
if you want to save file try following code snippet
HttpPostedFile file = Request.Files["myFile"];
//check file was submitted
if (file != null && file.ContentLength > 0)
{
string fname = Path.GetFileName(file.FileName);
file.SaveAs(Server.MapPath(Path.Combine("~/App_Data/", fname)));
}
如何转换成流,
HttpPostedFile file = Request.Files["myFile"];
var FileLen = file .ContentLength;
byte[] input = new byte[FileLen];
System.IO.Stream MyStream;
// Initialize the stream.
MyStream = file .InputStream;
// Read the file into the byte array.
MyStream.Read(input, 0, FileLen);
相关问题
- 1. 将图像转换为流
- 2. 如何将图像转换为Windows Phone 7中的字节流?
- 3. 如何将图像的流转换为GUID
- 4. 如何将图像字符串转换为Ruby中的流
- 5. 如何将视频流转换为android中的图像?
- 6. 如何将流速图转换为流体流图
- 7. 如何将位图转换为图像
- 8. 如何将图像转换为图标?
- 9. 如何将图像转换为位图
- 10. 如何将图像转换为字符流
- 11. 如何将响应流转换为图像?
- 12. 如何将java流转换为scala流?
- 13. 如何将PDL图像转换为GdkPixbuf
- 14. 如何将图像(BYTE *)转换为Base64
- 15. 如何将报告转换为图像?
- 16. 如何将图像转换为字节[]?
- 17. 如何将VarBinary值转换为图像?
- 18. 如何将PowerPoint转换为图像
- 19. 如何将图像转换为纹身?
- 20. C#:如何将.pptx转换为图像?
- 21. 如何将图像转换为CSS
- 22. 如何将PDF转换为图像?
- 23. 如何将CCSprite图像转换为UIImage?
- 24. 如何将HTML转换为TIFF图像?
- 25. 如何将Base64(imageurl)转换为图像
- 26. 如何将文本转换为图像?
- 27. 如何将网页转换为图像?
- 28. 如何将System__ComObject转换为图像?
- 29. 如何将UIScrollView转换为图像?
- 30. 如何将文本转换为图像?