Skip to content

Instantly share code, notes, and snippets.

@fleeting
Created February 1, 2010 21:24
Show Gist options
  • Save fleeting/292050 to your computer and use it in GitHub Desktop.
Save fleeting/292050 to your computer and use it in GitHub Desktop.
var c = Titanium.Network.createHTTPClient();
c.onload = function()
{
var f= Titanium.Filesystem.getFile("xhr.png");
f.write(this.responseData);
Titanium.Media.saveToPhotoGallery(f.url);
};
// open the client
c.open('GET','http://www.appcelerator.com/wp-content/uploads/2009/06/titanium_desk.png');
// send the data
c.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment