Andrea Giammarchi has taken the new Safari 4 implementation of multi input file upload functionality and has written an article on how to write the client and server to enable this.He shares the new XHR implementation:
var xhr = new XMLHttpRequest, upload = xhr.upload; upload.onload = function(){ console.log("Data fully sent"); }; xhr.open("post", page, true); xhr.send(binaryData);and the delves into a PHP server backend that groks things like X-File-Size and X-File-Name.
Then, he shows the client side code to push this all forward and packages it all up:
If you have better solution, just tell me !
0 comments:
Post a Comment