Back to Devexpress

IFileInputSelectedFile.Guid Property

blazor-devexpress-dot-blazor-dot-ifileinputselectedfile-ff3383f8.md

latest1.4 KB
Original Source

IFileInputSelectedFile.Guid Property

Returns the file’s globally unique identifier.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
string Guid { get; }

Property Value

TypeDescription
String

The file’s globally unique identifier.

|

Remarks

The following example gets identifiers of uploaded files:

razor
<DxFileInput FilesUploading="OnFilesUploading" />

@code {
    async Task OnFilesUploading(FilesUploadingEventArgs args) {
        foreach (var file in args.Files) {
            var Guid = file.Guid;
            // ...
            /* The following code is intended for demonstration purposes only.
            Do not read a stream directly in memory to avoid performance and security-related issues. */
            using var stream = new System.IO.MemoryStream();
            await file.OpenReadStream(file.Size).CopyToAsync(stream);
        }
    }
}

See Also

IFileInputSelectedFile Interface

IFileInputSelectedFile Members

DevExpress.Blazor Namespace