Titanium

Drupal Services 3 & Titanium Upload Photo From the Photo Gallery

So this is another example of session authenticated calls to Drupal services this time adding a image upload test form the device Photo Gallery - look at the titanium for more examples you need session authentication, token (user resource , file create , node create & user login & user logout for this to work ) response for matters JSON

Drupal Services + Titanium User Login / out & Create a node

var mydrupalrest ="http://192.168.1.8/ilocal/theend/";
Ti.App.Properties.setString("mydrupalrest", mydrupalrest);


var win = Titanium.UI.createWindow({
    title:'TEST DRUPAL SERVICES',
    backgroundColor:'#fff'
});


//view for login
  
var loginview = Ti.UI.createView({
    backgroundColor:'blue',
    borderRadius:5,
    layout:'vertical',
    top:120,
    height:300,
    width:300
});
  
var username = Ti.UI.createTextField({
    hintText:'Enter your username',
    top:10,
    left:10,
    right:10
});
loginview.add(username);