piotrszymaniec / fancy-upload

Fancy multi file upload form component with dragndrop, file listing and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fancy multi file upload form

fancyupload form layout fancyupload form layout

โœจ Introduction

Fancy-upload is form component that enables you to easily track files added for upload.
It also gives you extra capabilities which plain <input type="file"> does not have. Below you will find a list.

  1. Select files with Drag and drop.
  2. Persisting files select (by default another file browsing erases previous selection).
    Files will stay listed in form until you decide to "cancel" upload.
  3. List details that consists of colorful distinct file icon, name, its mime type and size in human readable format
  4. Files can be removed one by one from form
  5. Simple file duplicate detection - if name, size and type are the same, files are considered duplicates

๐ŸŽ‰Demo

Check component demo here

Usage instruction

Soon ๐Ÿ• ๐Ÿ™ƒ

๐Ÿ›  Built with

  • HTML
  • Drag and Drop and File API
  • CSS
  • Figma

โš™๏ธ Technical notes

File icon is decided upon inspecting file type and name properties of File objects from <input type="file"> control.
Script assumes that file extension is compliant to its mime type.
Some files does not include type property when uploaded via input, its mime type is missing so message "not available" is displayed instead.

โณ TODO

  • Move to format suitable for easy usage
  • Add summary listing file count and overal size of upload
  • Add form submition logic, and config for server endpoint
  • Recognize file mime types that has empty file.type property, like psd or woff.

๐Ÿ™ Thanks

โ“ Questions

For questions related to using form, you can raise issue here, or send me an email: piotr.szymaniec@gmail.com. Also if you found any bugs or unexpected behavior let me know via issues.

About

Fancy multi file upload form component with dragndrop, file listing and more


Languages

Language:JavaScript 60.2%Language:CSS 30.5%Language:HTML 9.4%