fluxtech-me / frontik

Frontend Development Libraries
https://frontik.js.org
MIT License
10 stars 0 forks source link

File Upload #21

Open maryprtavian opened 1 year ago

maryprtavian commented 1 year ago

File Upload Investigation

According to upload target there are 3 kinds of task

According to the user actions, there are 3 kinds of tasks:

From a performance perspective, we may need:

Suggested Libraries

Previously Highly Used Libraries

Comparison of the suggested libraries

React Dropzone Uploader React FilePond React Uppy
Browser support Chrome
Firefox
Edge
Safari - 10+, 9 (@babel/polyfill)
iOS Safari
Chrome for Android
Chrome
Firefox
Edge
Safari 9+
Opera
Chrome for Android
Firefox Android
iOS Safari 9+
Chrome for iOS
Firefox iOS
for IE11 - install the filepond-polyfill files
recent versions of:
Chrome
Firefox
Safari
Edge
Accepts -
  • Files
  • Directories
  • Blobs
  • Local URLs
  • Remote URLs
  • Data URIs
  • Cameras
local disk
Google Drive
Instagram
Remote urls
Cameras
etc.
Progress Tracking Yes Yes Yes
Chunk Uploading No Yes Yes
Styles Custom Styles Custom Styles Styles
Accessibility None Supported Supported
Docs React Dropzone Uploader FilePond React Uppy

React Dropzone is different from the above mentioned three libraries. Unlike the latter, it only gives us a dropzone — it has no API for managing uploads.

Demos

Base Properties

restrictions: {
    maxFileSize: null,
    minFileSize: null,
    maxTotalFileSize: null,
    maxNumberOfFiles: null,
    minNumberOfFiles: null,
    allowedFileTypes: null,
}

allowMultipleUploadBatches: true,

isDisabled: false

allowDrop: false, 
allowBrowse: false, 
allowPaste: false,
allowReplace: false, 

instantUpload:  false, 

disabled: false,
selectButtonLabel: null,
dropzoneText: null,

onBeforeUpload,
onAfterUpload,

oninit
onwarning
onerror
oninitfile
onaddfilestart
onaddfileprogress
onaddfile