Created
January 21, 2021 16:06
-
-
Save jzwang-dev/4b7fe7aaa2d6ea6eebb6ceff89ede8b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inline形式下載檔案 | |
public ActionResult DownloadTestFile() | |
{ | |
var fileBytes = Encoding.UTF8.GetBytes("Hello, World!"); | |
Response.AppendHeader("Content-Disposition", | |
JZLib.HeaderUtil.GetUnicodeContentDisposition("測試中文.txt", true)); | |
return File(fileBytes, "text/plain"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment