8

Any alternate thing in JavaScript to make a file upload control ?


actually the problem was, i am creating file upload control dynamically using htmlwriter, and when i use request.form[fileuplodctrl].tostring() , i am getting only the file name not path...

can any one suggest me any other ways to get full file path :)

John Saunders
  • 157,405
  • 24
  • 229
  • 388
Kishh
  • 1,679
  • 4
  • 17
  • 16
  • See also: https://stackoverflow.com/questions/5587973/javascript-upload-file and https://stackoverflow.com/questions/2320069/jquery-ajax-file-upload – Ilmari Karonen Mar 03 '18 at 23:21

2 Answers2

20

Here are a few alternatives:

Trevor Sullivan
  • 19,718
  • 7
  • 82
  • 121
Christian C. Salvadó
  • 723,813
  • 173
  • 899
  • 828
1

As far as I know there is no possibility to upload a file with pure JavaScript. You alway need some like a swf movie or a java applet (probably it will also work with a silverlight app). If you do not like to write your own, use one the existing ones from the last answer (Javascript file uploads).

Community
  • 1
  • 1
TheHippo
  • 54,987
  • 13
  • 72
  • 98