2015-01-07 2 views

답변

6

먼저 MVC에 대해 많이 알지 못하지만 이 필요 없습니다. FileStreamResult에 의존하는 코드를 사용하는 경우 FileStreamResultFileContentResult의 기본 클래스 인 FileResult에 의존하게 만들 수 있는지 확인하십시오.

하지만 그렇지 않으면, 당신은 항상 사용할 수 있습니다

var streamResult = new FileStreamResult(new MemoryStream(contentResult.FileContents), 
             contentResult.ContentType) 
streamResult.FileDownloadName = contentResult.FileDownloadName; 
// You could use an object initializer instead of a separate statement, of course. 
+0

어이 이것이 내가 대답 질문 근무! 고마워. :) – SantLev

관련 문제