# FileInput Example is Not Working

**URL:** <https://forum.radzen.com/t/fileinput-example-is-not-working/14016>\
**Category:** Radzen.Blazor Components\
**Created:** [May 6, 2023, 9:13pm UTC](https://forum.radzen.com/t/fileinput-example-is-not-working/14016 "2023-05-06T21:13:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Kiesel](https://forum.radzen.com/user_avatar/forum.radzen.com/jason_kiesel/32/14288_2.png) [@Jason\_Kiesel](https://forum.radzen.com/u/Jason_Kiesel)\
**Post date:** [May 6, 2023, 9:13pm UTC](https://forum.radzen.com/t/fileinput-example-is-not-working/14016/1 "2023-05-06T21:13:53Z")

</div>

I have copy / pasted the example you have online for the `FileInput` component (removing the DB call to Employee) and when I select a file, I get a "reconnecting to server error" in my browser and a resulting `OnError` event trigger. Is there a bug with the current `FileInput` component? All the others seem to be working fine. A screenshot of the error messages (both in `ErrorConsole` and in the browser dev tools) are seen here:

 ![Screenshot 2023-05-06 at 4.03.36 PM](https://forum.radzen.com/uploads/default/original/2X/3/3065234e0c34f912391353831aa4de311d70a6e0.jpeg)

My code is as follows:

```auto
@page "/file-upload"
@attribute [Authorize]

<div class="container-fluid">
    <div class="row px-3">
        <div class="col-lg-6 offset-lg-3 p-3">
            <RadzenCard>
                <RadzenFileInput @bind-FileName=@fileName @bind-FileSize=@fileSize TValue="string" class="w-100"
                                 Change=@(args => OnChange(args, "FileInput")) Error=@(args => OnError(args, "FileInput")) />
            </RadzenCard>
        </div>
    </div>
</div>

<EventConsole @ref=@console />

@code {
    EventConsole console;

    string fileName;
    long? fileSize;

    protected override async Task OnInitializedAsync()
    {
        await base.OnInitializedAsync();
    }

    void OnChange(string value, string name)
    {
        console.Log($"{name} value changed: {value}");
    }

    void OnError(UploadErrorEventArgs args, string name)
    {
        console.Log($"{args.Message}");
    }
}

```

I am using the same image (a small .PNG) for both the online demo (which works) and my own testing.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [May 7, 2023, 4:18am UTC](https://forum.radzen.com/t/fileinput-example-is-not-working/14016/2 "2023-05-07T04:18:02Z")

</div>

You will need to increase your buffer size:

> <https://github.com/radzenhq/radzen-blazor/blob/master/RadzenBlazorDemos.Server/Program.cs#L14>
