RadzenFileInput 700MB file, args = "" #457

Closed
opened 2026-01-29 17:37:37 +00:00 by claunia · 1 comment
Owner

Originally created by @MG1376 on GitHub (Jul 8, 2022).

I configured file input like this:

<RadzenFileInput @bind-Value="@file" TValue="string" Class="w-100" Accept="video/*,audio/*"
                                     Change="@(args => OnChange(args, item.AlbumID, item.Id))" @ref="@fileInput"
                                     Error="@(args => OnError(args, "FileInput"))" Placeholder="File Name"
                                     MaxFileSize="int.MaxValue">

</RadzenFileInput>      

With a method that reads audio/video as Base64 and save to file. But this only works for small video/audios. I want to store a 700MB movie. but when I debug, args is empty.
I set MaxFileSize="int.MaxValue" and this should store up to 2GB but I have problem with a 700MB file. How to use RadzenFileInput for larger files?

Originally created by @MG1376 on GitHub (Jul 8, 2022). I configured file input like this: ``` <RadzenFileInput @bind-Value="@file" TValue="string" Class="w-100" Accept="video/*,audio/*" Change="@(args => OnChange(args, item.AlbumID, item.Id))" @ref="@fileInput" Error="@(args => OnError(args, "FileInput"))" Placeholder="File Name" MaxFileSize="int.MaxValue"> </RadzenFileInput> ``` With a method that reads audio/video as Base64 and save to file. But this only works for small video/audios. I want to store a 700MB movie. but when I debug, args is empty. I set MaxFileSize="int.MaxValue" and this should store up to 2GB but I have problem with a 700MB file. How to use RadzenFileInput for larger files?
Author
Owner

@akorchev commented on GitHub (Jul 8, 2022):

You can't use RadzenFileInput for larger files as will have to send all data to the server and keep it in memory. Use RadzenUpload for this purpose or try the built in InputFile.

@akorchev commented on GitHub (Jul 8, 2022): You can't use RadzenFileInput for larger files as will have to send all data to the server and keep it in memory. Use RadzenUpload for this purpose or try the built in InputFile.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#457