What is the shortest way to get the string content of a HttpPostedFile in C#

后端 未结 1 594
执笔经年
执笔经年 2021-02-12 16:01

I have an HttpPostedFile object and just need to extract the content of the posted file.

I found this link but that\'s a very long process to just obtain a string with t

相关标签:
1条回答
  • 2021-02-12 16:24
    var str = new StreamReader(postedFile.InputStream).ReadToEnd();
    

    StreamReader.ReadToEnd

    0 讨论(0)
提交回复
热议问题