Passing path to uploaded file from HTML5 drag & drop to input field

前端 未结 3 1057
死守一世寂寞
死守一世寂寞 2020-12-29 09:36

I\'m working on an application (in Node.js, which is irrelevant for this case) which allows the user to upload an image. It works fine using a form with an input (type=\"fil

3条回答
  •  遥遥无期
    2020-12-29 10:26

    It is impossible to know the path of the field for security purposes. With drag and drop you must have it upload independently of the main form. Look here for an example: http://www.sitepoint.com/html5-file-drag-and-drop/

提交回复
热议问题