0

I'm trying to read a file line by line and I found this answer to do it. the problem is, it has to use a file input tag to select the file to read, so I need to replace a file input tag with something that will let me pre-program a file in, this is the tag

<input type="file" name="file" id="file">

(Please don't roast me if this is ridiculously obvious)

Community
  • 1
  • 1
F4Tornado
  • 183
  • 2
  • 14

1 Answers1

0

Just put the destination in the name

<input type="file" name="file" id="file" value="C:\Users\PC\Downloads\1.docx"\>

But of course like what abl said in the comment section. It will have a huge security hole because no user wants to have unwanted download of their files when submitting to your forms.

WTFZane
  • 592
  • 1
  • 4
  • 25