How do I serialize file type input in jquery

前端 未结 5 976
遥遥无期
遥遥无期 2020-12-31 10:04

Previously using Prototype I could serialize the input type file, it gave me the file name of the file being uploaded but when I serialized the form in jquery I just got the

5条回答
  •  失恋的感觉
    2020-12-31 11:03

    As someone else mentioned, you can submit a form containing file inputs via ajax, but it requires some hairy iframe magic. If you don't mind using jQuery, I highly suggest the jquery.forms plugin's ajaxSubmit function.

提交回复
热议问题