Open-source IoT Platform - Device management, data collection, processing and visualization.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Artem Halushko f8af340464 pulled with master 7 years ago
..
Readme.md pulled with master 7 years ago

Readme.md

You can programmatically invoke default OS file promt. In order to do that you'll have to set the ref on your Dropzone instance and call the instance open method.

let dropzoneRef;

<div>
  <Dropzone ref={(node) => { dropzoneRef = node; }} onDrop={(accepted, rejected) => { alert(accepted) }}>
      <p>Drop files here.</p>
  </Dropzone>
  <button type="button" onClick={() => { dropzoneRef.open() }}>
      Open File Dialog
  </button>
</div>

The completion handler for the open function is also the onDrop function.