Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-17253

iOS: Filename of a photo blob uploaded to ACS has no file extension and always has the same name

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 3.3.0
    • Fix Version/s: Release 3.3.0, Release 3.4.0
    • Component/s: Cloud, iOS
    • Environment:

      Mac OSX: 10.9.2
      AppC Studio: 3.3.0.201406271159
      SDK: 3.3.0.v20140627142513
      CLI: 3.3.0-rc4
      Alloy: 1.4.0-rc3
      ACS: 1.0.14
      ti.cloud: 3.2.3
      Devices: iPhone4(v7.1), iPhone5S(v7.1)

    • Sprint:
      2014 Sprint 13 SDK, 2014 Sprint 14 SDK

      Description

      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

      Actual Result:
      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

      photo: photo,
      

      is replaced with

      photo: Titanium.Filesystem.getFile('photo.jpg')
      

      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"

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                penrique Pedro Enrique (Inactive)
                Reporter:
                ssekhri Satyam Sekhri
                Reviewer:
                Sabil Rahim
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-18918
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration