You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Hazem Saleh (JIRA)" <ji...@apache.org> on 2019/02/24 08:58:00 UTC

[jira] [Commented] (CB-14004) Android SAVEDPHOTOALBUM - appends extra information to the end of FILE_URI '?value'

    [ https://issues.apache.org/jira/browse/CB-14004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16776161#comment-16776161 ] 

Hazem Saleh commented on CB-14004:
----------------------------------

Checking Camera plugin code, I found that the value that is appended to the URL represents a timestamp and it was mainly done like this to be a workaround in order to avoid deleting the album image by the app since it is placed in app cache when you select it cc [~macdonst]

> Android SAVEDPHOTOALBUM - appends extra information to the end of FILE_URI '?value'
> -----------------------------------------------------------------------------------
>
>                 Key: CB-14004
>                 URL: https://issues.apache.org/jira/browse/CB-14004
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-camera
>         Environment: Android devices (tested on Samsung, LG, Wiko, Huawei) 
> Version Android : 4.4 to 7.0
>            Reporter: Yeria Topalian
>            Priority: Major
>              Labels: FILE_URI, PictureSourceType, SAVEDPHOTOALBUM, android, camera, getPicture
>
> Hello,
>  
> When we upload a file from Library, the plugin appends a parameter with mark question like that *picture_1522245584282.jpg?1522245512731*
>  
> Code example :  
> {code:java}
> // 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);
> {code}
>  
> We use that solution for the moment :
> {code:java}
> let fullPath = WebAppLocalServer.localFileSystemUrl(imageUri.split('?')[0]);
> {code}
> But we think it's not a good solution.
> How can we prevent the addition of the mark question parameter ?
>  
> Thanks,
> Yeria
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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