I’m trying to let users upload a file/files that will then be scanned for data to be used within the local instance. The catch is that I’m trying to do this entirely locally so that the program is entirely self-contained (ie no server involved).
I tried using the view:“uploader” but haven’t been able to figure out how to retrieve the file objects from the uploader view. I’m basically trying to do the examples found here http://www.html5rocks.com/en/tutorials/file/dndfiles/ except within Webix. Is it possible to get files from the Webix uploader without bouncing .send() or ajax.post off of a server?
Thanks.
I can implement the above and it runs correctly, but the data object from the uploader doesn’t have a file path. How does one read the file from the uploader into a JavaScript text or object?
Due to the general security reasons, JavaScript has no access to the file system and the real path to the file is not available in the loaded object, unfortunately.
The same behaviour is valid for native <input type="file">, which is used in Webix uploader.
But if you need to read a file or perform any operation on it on the client-side, please use the FileReader API.
As an example, please check the following snippet with image/text preview: https://snippet.webix.com/vhop5uxg