Using a MemoryStream with FileStreamResult possible?

前端 未结 1 1162
感情败类
感情败类 2020-12-16 10:57

I\'m using DotNetZip to create a zip file and pass it to a FileResult. On debug, I can verify that the MemoryStream contains a file, but when I run it through FileStreamResu

相关标签:
1条回答
  • 2020-12-16 11:35

    Have you tried setting stream.Position = 0; after you do the zip.Save(stream)?

    Also, you might confirm that data is actually being written to the stream. Check stream.Length after zip.Save. If stream.Length is zero, then nothing's being written.

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