Time for action – uploading a photo to the cloud
Perform the following steps to upload a photo to the cloud:
Create a new project by navigating to File | New | Titanium Project. Select the Default Project template.
Enable ACS in your existing app. Go to
tiapp.xml
and click on the Enable... button in the Cloud Services section.Go to the cloud website at https://my.appcelerator.com/apps find your new app and select Manage ACS. Select Development from the selection buttons at the top.
You need to define a user so your app can log in to ACS. From the App Management tab select Users from the list on the right. If you have not already created a suitable user, do it now.
We will split the functionality in this chapter over two files, the cloud functionality in
cloud.js
and the usual layout items inapp.js
.First create the layout in
app.js
. This will be a simple button and image view will allow the user to upload a photo from the photo gallery when the button is clicked. The image view will show the...