Skip to content
This repository has been archived by the owner on Apr 3, 2022. It is now read-only.

A simple file input library to expand the functionality of the HTML5 file input

License

Notifications You must be signed in to change notification settings

theRealPadster/improved-file-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

improved-file-input

npm (scoped) npm bundle size

A simple file input library to expand the functionality of the HTML5 file input.

Install

$ npm install improved-file-input

Usage

const ifi = require('improved-file-input');
const attachments = document.querySelector('input[name="attachments"]');
const fileInput = new ifi(attachments, 5);

document.getElementById('demoForm').addEventListener('submit', (e) => {
  e.preventDefault();

  console.log('fileInput.files:', fileInput.files);
  //=> 'fileInput.files:' (2) [File, File]
});

About

A simple file input library to expand the functionality of the HTML5 file input

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published