XMLHttpRequest POST multipart/form-data

后端 未结 7 1591
清酒与你
清酒与你 2020-12-04 20:33

I want to use XMLHttpRequest in JavaScript to POST a form that includes a file type input element so that I can avoid page refresh and get useful XML back.

I can sub

7条回答
  •  青春惊慌失措
    2020-12-04 20:35

    There isn't any way to access a file input field inside javascript so there isn't a javascript only solution for ajax file uploads.

    There are workaround like using an iframe.

    The other option would be to use something like SWFUpload or Google Gears

提交回复
热议问题