Files
Gary Sharp 5ce9e51ae7 Feature: MS Excel (xlsx) Import/Export
Microsoft Excel files can be used to import/export devices. Several
import bugs were also fixed in the process.
2017-03-25 15:37:28 +11:00

18 lines
465 B
C#

using System.Web.Mvc;
namespace Disco.Web.Extensions
{
public static class FileExtensions
{
public static FileContentSpanResult File(this IController controller, byte[] fileBuffer, int start, int length, string contentType, string fileDownloadName)
{
return new FileContentSpanResult(fileBuffer, start, length, contentType)
{
FileDownloadName = fileDownloadName
};
}
}
}