electron-dir-files

1.0.1 • Public • Published

electron-dir-files

In Electron, use the webkitdirectory property in input element has bug.

So I used Electron Dialog get the directory name, and create the fakeBrowserFile for renderer-process, You can use it for existing Browser JavaScript Library, but modified a little.

let electronDirFile = require('electron-dir-files');
 
someElement.addEventListener('click', () => {
    electronDirFile().then(files => {
        // use the files like `webkitdirectory` get
    })
})
 
// fakeBrowserFile to Blob
file.toBlob().then(blob => {
    // blob is the file
})
 
let slicer = file.slice(0, 100);
slicer().then(blob => {
    // the slice blob
})
 

Readme

Keywords

none

Package Sidebar

Install

npm i electron-dir-files

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

47.1 kB

Total Files

15

Last publish

Collaborators

  • geeknull