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

File Upload does not send additional fields

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.9.0
    • Fix Version/s: 2.0.0
    • Component/s: cordova-ios
    • Environment:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: