-1

I would like to download a file (public URL) and save it to my application directory

Titanium.Filesystem.applicationDataDirectory

Now if I would want to show that image in an ImageView what will be the path I use ?

Prakash Raman
  • 13,319
  • 27
  • 82
  • 132

1 Answers1

0

Try this code,

 var photoFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, <Your Image Name with .png or .jpg>);

    var blobOfImage = photoFile.read();

                var imageView = Titanium.UI.createImageView({
                    image : blobOfImage,
                    width : 'auto',
                    height : 'auto'
                });

I think this is helpful for you.

MRT
  • 1,610
  • 15
  • 41