Show / Hide Table of Contents

Class FileDownloads

A class that contains methods that assist with facilitating file downloads.

Inheritance
System.Object
FileDownloads
Namespace: LymeTemplateApi.Code
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
Type Description
DownloadToken

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
Type Description
Task<DownloadToken>

GetContentType(String)

Declaration
public static string GetContentType(string fileName)
Parameters
Type Name Description
System.String fileName
Returns
Type Description
System.String
In This Article
Back to top Generated by DocFX