javascript - How does FormData() knows the path in OS of the file that is submitted in the form? -
here dump of file object passed formdata(). there no path info. file on desktop, not in project folder javascript running.
i using following code submit form. how program know path of file sending in form? same confuse me when using filereader instead of form os file user submitted. there file name in file object.
my question path info?
var formdata = new formdata(); formdata.append("username", "groucho"); formdata.append("accountnum", 123456); // number 123456 converted string "123456" // html file input user's choice... formdata.append("userfile", fileinputelement.files[0]);
the fileinputelement.files[0]
represent input of input type="file"
element.
the browser intermediate between actual file , server / client. reads bytes disk , passes steam.
Comments
Post a Comment