You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

BlazorBasics.InputFileExtended

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

BlazorBasics.InputFileExtended

Component Blazor extend InputFile with drag and drop, copy and paste and all the necessary to upload files. Also have a InputFileHandler can be inherit for extent and add more functions like authentication.

3.7.32
nugetNuGet
Version published
Maintainers
2
Created
Source

Nuget Nuget

Description

Extend the traditional component InputFile with more options like drag and drop, copy and paste. Less coding for all. Oficial web documentation and examples.

How to use simple way

Import the name space adding to _Imports.razor this line:

@using BlazorBasics.InputFileExtended

Add into your component:

<InputFileComponent OnChange=LoadFiles />

@code {
    private void LoadFiles(FilesUploadEventArgs e)
    {
        ...
    }
}

How to use with drag and drop

@using BlazorBasics.InputFileExtended

<InputFileComponent Parameters="Parameters" OnChange=LoadFiles />

@code{
    BlazorBasics.InputFileExtended.ValueObjects.InputFileParameters Parameters = new BlazorBasics.InputFileExtended.ValueObjects.InputFileParameters()
    {
        DragAndDropOptions = new BlazorBasics.InputFileExtended.ValueObjects.DragAndDropOptions
        {
            CanDropFiles = true
        }
    };

    private void LoadFiles(FilesUploadEventArgs e)
    {
        // ...
    }
}

How to use with copy and paste

@using BlazorBasics.InputFileExtended

<InputFileComponent Parameters="Parameters" OnChange=LoadFiles />

@code{
    BlazorBasics.InputFileExtended.ValueObjects.InputFileParameters Parameters = new BlazorBasics.InputFileExtended.ValueObjects.InputFileParameters()
    {
        AllowPasteFiles = true
    };

    private void LoadFiles(FilesUploadEventArgs e)
    {
        // ...
    }
}

How to use with upload button

@using BlazorBasics.InputFileExtended

<InputFileComponent Parameters="Parameters" />

@code {
    BlazorBasics.InputFileExtended.ValueObjects.InputFileParameters Parameters;

    Task<bool> UploadFles(IReadOnlyList<BlazorBasics.InputFileExtended.Models.FileUploadContent> files)
    {
        // process your upload
        // ...
        await Task.Delay(1);
        return true;
    }

    protected override void OnInitialized()
    {
        Parameters = new BlazorBasics.InputFileExtended.ValueObjects.InputFileParameters()
        {
            ButtonOptions = new BlazorBasics.InputFileExtended.ValueObjects.ButtonOptions
            {
                ButtonShow = true,
                CleanOnSuccessUpload = true            
            }
        };
        Parameters.ButtonOptions.OnSubmit = UploadFles;
    }
}

Keywords

Components

FAQs

Package last updated on 29 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts