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

File Upload does not send additional fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.9.0
    • 2.0.0
    • cordova-ios
    • iOS 5.1.1

    Description

      Similar code using the pattern below used to work in previous versions. Trying to upgrade to the latest and noticed this issue. Cannot seem to work around it. The file binary posts fine but there are no additional fields despite the options object specifying 'params':

      var options = new FileUploadOptions();

      options.fileKey = 'file';
      options.fileName = imageURI;
      options.mimeType = 'image/jpeg';

      options.params =

      { key1: 'value1', key2: 'value2' }

      ;

      new FileTransfer().upload(
      imagePath,
      remoteURL,
      successFn,
      errorFn,
      options);

      This currently prevents upload to any server which requires a single multipart body.

      Attachments

        Activity

          People

            shazron Shazron Abdullah
            mckamey Stephen McKamey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: