cordova - Upload a blob with Phonegap FileTransfer - and receive binary -
i want upload binary data (e.g. image, or zip) server using phonegap, , receive binary response. possible? while upload works filetransfer
, file stored on disk, cant work blob
var blob = new blob([something], {type: 'application/zip'}); var bloburl = window.url.createobjecturl(blob); var ft = new filetransfer(); ft.upload(bloburl, encodeuri('http://server'), win, fail, options);
the bloburl of course like
blob:1234-...
which filetransfer not find. tried save blob first, passing path filetransfer
- phonegaps filewriter
cannot process blob
.
using xhr
not option cannot receive binary files in phonegap (wp8). mimetypeoverride
trick not work in case internet explorers xhr not have option.
i working windows phone 8.
you can't send binary data through phonegap file transfer.
your binary data must converted base64 string , transferred server. same thing goes other way.
here's tutorial how handle binary data transfer phonegap: http://blog.safaribooksonline.com/2012/03/01/phonegap-tip-binary-filesystem-data/
Comments
Post a Comment