Hi all, I am doing an app where a user can upload up to 3 photos in a particular web service. I am looking for guidance on best practice of how to handle this. Originally, I was going to store images as BLOBs in my database, but instead, I think it may be better to store the urls in the database? I am seeking advice on how to post the images to the web service and how to store them? What I have so far is the following:
//var Photos_array=[]; Upload_pic.addEventListener('click', function (e){ Upload_pic.setImage('/images/uploadPhoto2.png'); Titanium.Media.openPhotoGallery({ success: function(e){ ImageView = Ti.UI.createImageView({ image:e.media, width:'200dp', height: '200dp' }); }, error: function(e){ alert("Error accessing photos"); }, cancel: function(e){ alert("Gallery was cancelled"); }, alowEditing:true, mediaType:[Titanium.Media.MEDIA_TYPE_PHOTO] }); console.log(typeof ImageView.image); //Photos_array.push(ImageView.image); });the console was returning BLOB and when I was trying to upload to the webservice as a blob originally, it wasn't working.