I'm trying to upload an array of images but it don't upload any images of my array... someone knows how to upload multiple medias?
var imgs = [] imgs.push( Ti.Filesystem.tempDirectory, "img1.png" ); imgs.push( Ti.Filesystem.tempDirectory, "img2.png" ); imgs.push( Ti.Filesystem.tempDirectory, "img3.png" ); imgs.push( Ti.Filesystem.tempDirectory, "img4.png" ); xhr = Ti.Network.createHTTPClient(); xhr.onload = function(e){ Ti.API.info( 'Success' ); }; xhr.error = function(e){ Ti.API.info( "Error" ); }; xhr.onsendstream = function(e){ Ti.API.info( "ONSENDSTREAM - PROGRESS: " + e.progress ) }; xhr.setRequestHeader( "Content-Type", "multipart/form-data" ); xhr.open( 'POST', 'myServerURL' ); xhr.send({ "media" : imgs // This don't work! //"media" : imgs[0] -- THIS WORK });