p2plabsxyz / dscan

A decentralized storage and file-sharing tool that uploads content to IPFS and generates decentralized QR codes.
https://chromewebstore.google.com/detail/dscan-own-your-identity-o/idpfgkgogjjgklefnkjdpghkifbjenap
MIT License
38 stars 26 forks source link

[fix]: error when upload in cancelled and limit max percentage #34

Closed zluipaiva closed 2 years ago

zluipaiva commented 2 years ago

Related Issue (if any)

Closes: #33

Describe the add-ons or changes you've made

Modified the upload functions to not execute when files.length is 0. Also a small fix on the percentage loader to always be smaller than 100% (it used to break for very small files, e.g. an empty folder)

Type of change

How Has This Been Tested?

The same steps mentioned on #33

  1. Click on "Upload" button
  2. Select a file and confirm upload
  3. Click on "Upload" again
  4. Cancel the file upload

Checklist: