control the working directory for <input type=“file”>?

前端 未结 6 1529
梦谈多话
梦谈多话 2020-11-29 11:11

Full story: I am working on a project for my company that requires users at each of our locations to upload reports generated by a third party software. All reports generate

6条回答
  •  北海茫月
    2020-11-29 11:43

    You cannot set the value of an input file, that is a security issue.

    You can use an activex control, although that stuff is getting pretty out dated. There are many advanced file upload activex controls and I bet you can pick one up pretty cheap.

    Registry setting for Download directory might do the trick: (even though its an upload) and you would have to figure out how to set it every time they open IE

    HKCU\Software\Microsoft\Internet Explorer\DownloadDirectory
    

提交回复
热议问题