Input File field to Input Text field

后端 未结 3 925
别跟我提以往
别跟我提以往 2020-12-21 06:41

I don\'t even know if this is possible or not but is there a method you can take the value of the selected file in a input file field to a input tex

3条回答
  •  一生所求
    2020-12-21 07:26

    You can't do it without first storing the file on your own server.

    The file input control does not contain the file's data. Your browser provides it to you as a placeholder until you submit the file data via a POST form submission.

    If you're after the file's path, you also cannot do that (in modern browsers, as Pekka says). The browser does not give that information to client-side scripts. It may provide the filename, however.

提交回复
热议问题