-->
Page 1 of 5

POST from Javascript to upload file

PostPosted: Sat Sep 02, 2017 7:57 am
by dnts
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.

Re: POST from Javascript to upload file

PostPosted: Sat Sep 02, 2017 10:28 am
by martinayotte
Doing a google search with "javascript HTTP post" will reveal you tons of possible answers ... :ugeek:

Re: POST from Javascript to upload file

PostPosted: Sat Sep 02, 2017 11:08 am
by dnts
martinayotte wrote:Doing a google search with "javascript HTTP post" will reveal you tons of possible answers ... :ugeek:

Yeah... about that... you see - I've kind of exhausted web search and numerous trials on this problem. So many examples. So many functions I've tried. Installed sniffers. Nothing.
So if anyone has an answer rather than redirect me to google - please come forward.
Thx

Re: POST from Javascript to upload file

PostPosted: Sat Sep 02, 2017 11:40 am
by martinayotte
dnts wrote:
So if anyone has an answer rather than redirect me to google - please come forward.

It is a bit like saying "could someone do the search for me ?"
The first hit on google would have you reveal the answer on stackoverflow.