▽1
●
degucho ●150ポイント ベストアンサー |
自分の場合は下記リンクのやりかたでいけました。
http://chaika.hatenablog.com/entry/2014/04/12/001012
https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects
Mozilla のサイトに $.ajax を使ってアップロードするソースのサンプルがありました。
var fd = new FormData(document.querySelector("form")); fd.append("CustomField", "This is some extra data"); $.ajax({ url: "stash.php", type: "POST", data: fd, processData: false, // tell jQuery not to process the data contentType: false // tell jQuery not to set contentType });