in cordova/phonegap app i'm testing on android 4.0 need send file server multipart/form-data through ajax. i have file content in arraybuffer , put in formdata , firstly creating blob it. the problem file sent appears empty. this console session (performed on android platform through weinre ) can see that: the file content loaded in mybuf a blob created mybuf (and size non-zero) a formdata object created sent ( fd ) (i'm using webkitblobbuilder because blob constructor raises typeerror on platform) ❯ mybuf ▼ arraybuffer bytelength: 23673 ▶ __proto__: arraybuffer ❯ var bb = new webkitblobbuilder() undefined ❯ bb.append(mybuf) undefined ❯ myblob = bb.getblob("image/jpeg") ▼ blob size: 23673 type: "image/jpeg" ▶ __proto__: blob ❯ fd = new formdata() ▶ formdata ❯ fd.append("pics[]", myblob, "1433412118197.jpg") undefined when perform ajax request passing fd object data, see...
Comments
Post a Comment