Apache Cordova
  1. Apache Cordova
  2. CB-488

FileTransfer.upload does not follow redirects on Android

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.3.0, 1.4.0, 1.5.0
    • Fix Version/s: Master
    • Component/s: Android
    • Labels:
      None
    • Environment:

      Andoid device: Samsung Galaxy S Plus

      Description

      We are trying to upload a local move file to Youtube though the Youtube API. This API works in such a way that after uploading a file a redirect is done to another location. Unfortunately the Android implementation of FileTransfer does not follow this redirect. (The iPhone implementation does follow the redirect.)

      Steps to reproduce:

      Actual Result:

      • In the success callback the FileUploadResult.responseCode is 302, and the FileUploadResult.response is "Temporarily Moved" (or similar depending on the webserver that responded with the redirect).

      Expected Result:

      • The redirect is followed and the result of the new location is retreived and represented in the FileUploadResult instance.
        Or (but lower preference):
      • The FileUploadResult instance also contains the HTTP headers that were sent with the response so that the Location header (containging the url to redirect to) is known.

        Activity

          People

          • Assignee:
            Andrew Grieve
            Reporter:
            Wouter
          • Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development