Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-268

Resized photo URI's don't work with FileTransfer.upload

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.4.0
    • cordova-android
    • None

    Description

      If I call "navigator.camera.getPicture" while specifying sourceType as PHOTOLIBRARY and a targetWidth/Height, the resulting URI that gets returned looks like this "file:///blah/blah/resize.jpg?12312123" . That ?123123 suffix on the end causes "new FileTransfer().upload(myUri,...)" to fail unless I manually remove the suffix from the URI. This seems like a poor design, especially since it's not obvious why the file upload fails (it just says 'code 1').

      It seems the suffix was added to resolve CB-17, but it seems like CB-17 could be resolved by putting the timestamp before the .jpg part as well, and then it wouldn't break FileTransfer.

      Attachments

        Activity

          People

            macdonst Simon MacDonald
            vickor Durham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: