How to easily upload files without form submission (with jQuery + AJAX)

前端 未结 3 1234
渐次进展
渐次进展 2021-01-26 20:44

So I have some form processing code which processes the standard text inputs and also uploaded files (through the $_FILES array)

I want to have the submission done throu

3条回答
  •  温柔的废话
    2021-01-26 21:07

    You can try using HTML 5's file upload API, which will require they drag and drop the file into the browser window. Read more here: http://www.appelsiini.net/2009/10/html5-drag-and-drop-multiple-file-upload

    Additionally, you can do the same thing with Google Gears (which requires an install for IE but is default on Chrome).

    It is possible to detect the presence of either and degrade gracefully.

提交回复
热议问题