Class FileDownloads
A class that contains methods that assist with facilitating file downloads.
Inheritance
System.Object
FileDownloads
Assembly: LymeTemplateApi.Code.dll
Syntax
public class FileDownloads : object
Methods
CreateDownloadToken(DataContext, String, String)
Creates a secure download token using an overriding filename
Declaration
public static DownloadToken CreateDownloadToken(DataContext db, string filePath, string fileName = "")
Parameters
Type |
Name |
Description |
DataContext |
db |
|
System.String |
filePath |
|
System.String |
fileName |
Optional overriding filename.
|
Returns
CreateDownloadTokenAsync(DataContext, String, String)
Declaration
public static async Task<DownloadToken> CreateDownloadTokenAsync(DataContext db, string filePath, string fileName = "")
Parameters
Type |
Name |
Description |
DataContext |
db |
|
System.String |
filePath |
|
System.String |
fileName |
|
Returns
GetContentType(String)
Declaration
public static string GetContentType(string fileName)
Parameters
Type |
Name |
Description |
System.String |
fileName |
|
Returns
Type |
Description |
System.String |
|