How to use input type file in jsfiddle

broken image
broken image
broken image

Making it possible both to set the files properties of elements to FileList objects (as NW.js does), to and construct FileList objects file-path strings (either arrays of strings, or File objects constructed from strings). There are two ways I can think of doing this: This might be because the application provides its own UI for choosing files, or it might be (as in my case) because the application’s purpose is to automate repetitive website forms that require the same files to be uploaded. For instance, a browser application that uses Electron may need to navigate to a webpage, then add a file chosen by the user to the webpage-without activating an OS-native file-choosing dialog. It would be wonderful, however, if electron also somehow supported adding local files to elements. Electron should support adding local files to elements.Įlectron primarily uses file-path strings to read files: the purpose of both the dialog API and the File DOM object’s added API is to return file-path strings, which presumably will then be read by some node.js module. It’s currently not possible to programmatically upload files using Electron.