Class BeforeImageLoadEventArgs<TValue>
Represents the class for BeforeImageLoad event arguments.
Inheritance
Namespace: Syncfusion.Blazor.FileManager
Assembly: Syncfusion.Blazor.dll
Syntax
public class BeforeImageLoadEventArgs<TValue> : Object
Type Parameters
Name | Description |
---|---|
TValue | Specifies the TValue of the FileManager. |
Remarks
Custom header cannot be passed in GetImage request since it is processed using query string parameter.
Constructors
BeforeImageLoadEventArgs()
Declaration
public BeforeImageLoadEventArgs()
Properties
FileDetails
Gets or sets the current rendering image item details as an array of JSON object.
Declaration
public TValue FileDetails { get; set; }
Property Value
Type |
---|
TValue |
FileStream
Gets or sets the image file stream to be loaded.
Declaration
public Stream FileStream { get; set; }
Property Value
Type | Description |
---|---|
System.IO.Stream | The image file stream. |
Remarks
The users can pass the image file stream to be loaded with preview.
HttpClientInstance
Gets or sets the System.Net.Http.HttpClient instance used for sending HTTP requests to file providers.
Declaration
public HttpClient HttpClientInstance { get; set; }
Property Value
Type |
---|
System.Net.Http.HttpClient |
Remarks
Authentication tokens, such as JWT, can be configured with this instance to secure requests. This property is optional; if not set, default HTTP client settings will be applied. Note: This property is not applicable for flat data rendering, where file data is determined based on the server data.
ImageUrl
Gets or sets the URL of an image, along with any custom attributes that should be sent to the server.
Declaration
public string ImageUrl { get; set; }
Property Value
Type |
---|
System.String |
Remarks
The ImageUrl property is used to specify the URL of an image that should be displayed in the FileManager. You can also include any custom attributes that should be sent to the server along with the image request, such as authentication tokens or session IDs. The server can then use these attributes to customize the image response or perform additional validation before returning the image data.
UseImageAsUrl
Gets or sets a value indicating whether the image source should be represented as an URL or in Base64 format.
Declaration
public bool UseImageAsUrl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Set this property to
true
to render the image source as an URL, suitable for direct referencing from a server. This approach is ideal when the images are publicly accessible or the File Manager can handle image URLs directly.Set this property to
false
to render the image source as a Base64-encoded string. This is particularly useful in scenarios where the File Manager must authenticate requests in order to access the images.