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

FileTransfer multiple files doesn't work on WP8

    XMLWordPrintableJSON

Details

    Description

      I was trying to upload multiple photos on my WP8 testing device, but the files weren't sent.

      It worked on my ios and android environments though. Also posting one photo did work on the WP8 device.

      After debugging I found out that inside the FileTransfer plugin there was a problem with the callback id's not being used correctly. The moment one thread finished uploading, multiple threads started using the same callback id.

      In the end I fixed this issue by adding a (probably missing parameter) inside the ReadCallback method. I changed

      DispatchCommandResult(new PluginResult(PluginResult.Status.OK, new FileUploadResult(bytesSent, (long)response.StatusCode, responseString)));

      Into

      DispatchCommandResult(new PluginResult(PluginResult.Status.OK, new FileUploadResult(bytesSent, (long)response.StatusCode, responseString)), reqState.options.CallbackId);

      Attachments

        Activity

          People

            purplecabbage Jesse MacFadyen
            andreeeeee André van der Plas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: