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

前端 未结 3 1291
渐次进展
渐次进展 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:06

    Ajax (as defined, using JavaScript) cannot perform file uploads, as JavaScript cannot access the local filesystem. There are workarounds that seem to use Ajax, such as an iframe or using Flash.

    Hunt around Google, you'll find something. There are more libraries (YUI for example) that are putting this together.

提交回复
热议问题