1.0.7 • Published 1 year ago

imnd-upload v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

imnd-upload

File uploading component.

It uses imnd-dom and imnd-ajax libs. Available options is set by defaults() method as json object:

  • upload-url: api endpoint;
  • file-id: file input element id;
  • chunk-size: the size of the chunks into which the file is divided;
  • on-complete: what to do after a successful download.

Usage:

  <form>
    <input type="file" id="file" />
    <input type="button" id="file-upload" value="Send" />
  </form>
 
  <script>
  import upload from 'imnd-upload';

  upload
    .defaults({
      "chunk-size" : 120000,
      "file-id" : "file",
       "upload-url" : "accept.php",
      "on-complete" : () => {
        ...
      },
    })
    .attach('file-upload');
 </script>
1.0.7

1 year ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago