how to get client side path of the uploded file

前端 未结 2 1449
终归单人心
终归单人心 2020-12-12 05:21

I have a form that uploads files, i need to get client side path to file?
server path i could get from php array $_FILES

$_FILES[\"UploadFileName\"][\"tm         


        
相关标签:
2条回答
  • 2020-12-12 06:15

    You can't. That's a security matter and the browsers will not provide that to you.

    0 讨论(0)
  • 2020-12-12 06:15

    How to get client side path to file stored on a client computer?

    It is not allowed for security reasons.If this were possible, an attacker could gain information regarding how files/folders were structured on a client computer. Any fully trusted code on users' machine can do that. So your goal is to convince user to install something that will provide you with the information.

    For Windows (all require installation of some sort):

    • ActiveX controls
    • Native EXE
    • Locally installed managed EXE
    • locally installed HTA for IE only
    0 讨论(0)
提交回复
热议问题