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

Android SAVEDPHOTOALBUM - appends extra information to the end of FILE_URI '?value'

    XMLWordPrintableJSON

Details

    Description

      Hello,

       

      When we upload a file from Library, the plugin appends a parameter with mark question like that picture_1522245584282.jpg?1522245512731

       

      Code example :  

      // for Android Library
      srcType = Camera.PictureSourceType.SAVEDPHOTOALBUM;
      options = {
        quality: 100,
        width : 500,
        height : 500,
        targetWidth : 500,
        targetHeight : 500,
        destinationType: Camera.DestinationType.FILE_URI,
        sourceType: srcType,
        // encodingType: Camera.EncodingType.JPEG,
        mediaType: Camera.MediaType.PICTURE,
        allowEdit: true,
        correctOrientation: true  //Corrects Android orientation quirks
      };
      navigator.camera.getPicture(function cameraSuccess(imageUri) {
        // You may choose to copy the picture, save it somewhere, or upload.
        let fullPath = WebAppLocalServer.localFileSystemUrl(imageUri);
      }, function cameraError(error) {
        console.debug(error.reason);
      }, options);
      

       

      We use that solution for the moment :

      let fullPath = WebAppLocalServer.localFileSystemUrl(imageUri.split('?')[0]);
      

      But we think it's not a good solution.

      How can we prevent the addition of the mark question parameter ?

       

      Thanks,

      Yeria

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Yeria Yeria Topalian
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: