cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimir-kotikov <...@git.apache.org>
Subject [GitHub] cordova-plugin-camera pull request: Try to use realpath filename i...
Date Wed, 14 Oct 2015 15:27:02 GMT
Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/99#discussion_r42008744
  
    --- Diff: src/android/CameraLauncher.java ---
    @@ -498,15 +498,19 @@ private void refreshGallery(Uri contentUri)
     
     
     private String ouputModifiedBitmap(Bitmap bitmap, Uri uri) throws IOException {
    +        // Some content: URIs do not map to file paths (e.g. picasa).
    +        String realPath = FileHelper.getRealPath(uri, this.cordova);
    +
    +        // Get filename from uri
    +        String fileName = realPath != null ? realPath.substring(realPath.lastIndexOf('/')
+ 1) : "modified.jpg";
    --- End diff --
    
    This doesn't respect `encodingType` parameter. In case if `encodingType == PNG` resultant
filename still might have '.jpg' extension.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message