Share via


FileDownloadContext Class

Definition

Extended media context for the FileDownload component providing click invocation and filename.

public sealed class FileDownloadContext : Microsoft.AspNetCore.Components.Web.Media.MediaContext
type FileDownloadContext = class
    inherit MediaContext
Public NotInheritable Class FileDownloadContext
Inherits MediaContext
Inheritance
FileDownloadContext

Constructors

Name Description
FileDownloadContext()

Properties

Name Description
Element

Element reference for use with @ref. Assigning this propagates the DOM element to the component.

(Inherited from MediaContext)
FileName

Gets the file name suggested to the browser when initiating the download.

HasError

Indicates whether the last load attempt failed.

(Inherited from MediaContext)
IsLoading

Indicates whether the media is currently loading.

(Inherited from MediaContext)
ObjectUrl

The object URL for the media (image/video) or null if not loaded yet (not used for FileDownload).

(Inherited from MediaContext)

Methods

Name Description
InvokeAsync()

Initiates the download by invoking the underlying click handler of the parent.

Applies to