Affects Version/s: Release 3.3.0
Mac OSX: 10.9.2
AppC Studio: 188.8.131.52406271159
Devices: iPhone4(v7.1), iPhone5S(v7.1)
Sprint:2014 Sprint 13 SDK, 2014 Sprint 14 SDK
When a image blob from a camera or gallery is uploaded on the ACS, it always has the same filename as "file0." and also the file extension is missing.
The issue is a regression and it did not occur on 3.2.3.GA.
Also the issue does not occur on Android. On iOS, if the photo to be uploaded is assigned through an image file instead of a blob from camera or gallery then it works fine.
Steps to Reproduce:
1. Create a default titanium classic app
2. Copy the app.js and windows folder from "~/Library/Application Support/Titanium/modules/commonjs/ti.cloud/3.2.3/example" into the Resources directory of the project.
3. Install and launch app on iOS device
4. Create a user from Users > Create User
5. Press back button twice and go to Photos > Create Photo
6. Press "Select Photo from Gallery" or "Take Photo with Camera" to select/take a photo and use it
7. Press Create button. The photo gets uploaded to the cloud and "Uploaded" alert is shown
8. Next go to Dashboard and check the photos object saved in the cloud for your project
The photo object is created with filename "file0.". Every new photo from camera or gallery that is uploaded to the cloud has the same filename. And also it does not have a file extension.
If in the project file at "Resources > Windows > Photos > create.js", the line 147
is replaced with
i.e. we assign the photo parameter of the photo create with a file instead of the blob from Camera or Gallery, then the issue does not occur and the new photo object in cloud is saved with the filename "photo.jpg"