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

FileTransfer.download leaves 0 byte file in filesystem on 404 from server

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0
    • cordova-android
    • None
    • Android 2.3.

    Description

      To reproduce:

      Call fileTransfer.download, passing a URL which returns 404.

      Error callback will be correctly fired. But 0-byte file will be left on filesystem. This is because:

      FileOutputStream outputStream = new FileOutputStream(file);

      is called before the getInputStream is called.

      Attachments

        Activity

          People

            bowserj Joey Robert Bowser
            cgrassick Clayton Grassick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: