POST from Javascript to upload file
Posted: Sat Sep 02, 2017 7:57 am
All,
Using the well known and used /edit file system server. I want to upload a file from the browser using javascript rather than from the form itself (using the simple "upload file" example). Since it might be a large file, HTTP POST is the way to go since it will break the file into multiple packets that the ESP knows how to handle. Problem is - how do I do it in Javascript? I have a VAR holding the file content (a long XML string) and a VAR holding the required file name... what is the next step?
Thanks.
Using the well known and used /edit file system server. I want to upload a file from the browser using javascript rather than from the form itself (using the simple "upload file" example). Since it might be a large file, HTTP POST is the way to go since it will break the file into multiple packets that the ESP knows how to handle. Problem is - how do I do it in Javascript? I have a VAR holding the file content (a long XML string) and a VAR holding the required file name... what is the next step?
Thanks.