cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Bowser (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-7074) File Transfer doesn't upload the correct file when transferring multiple file_uri selected from the gallery
Date Thu, 04 Feb 2016 19:37:39 GMT

     [ https://issues.apache.org/jira/browse/CB-7074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Joe Bowser resolved CB-7074.
----------------------------
    Resolution: Fixed

Agreed.  This was fixed when I did a bunch of refactoring for more serious Camera issues.

> File Transfer doesn't upload the correct file when transferring multiple file_uri selected
from the gallery
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CB-7074
>                 URL: https://issues.apache.org/jira/browse/CB-7074
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 3.5.0
>            Reporter: Darrell Wu
>            Priority: Minor
>              Labels: android, camera, filetransfer
>
> I have a situation where our app allows the user to  select multiple photos from the
gallery one at a time through the navigator.camera.getPicture api.
> The file URI return by the api is something like file:///mnt/sdcard/Android/data/appname/cache/modified.jpg?1404428300297
> I store these file URI in an array.  So i have an array of these file e.g. 
> file:///mnt/sdcard/Android/data/appname/cache/modified.jpg?1404428300297
> file:///mnt/sdcard/Android/data/appname/cache/modified.jpg?1404428300345
> file:///mnt/sdcard/Android/data/appname/cache/modified.jpg?1404428300684
> I then proceed to transfer these file to the server one at a time using the file transfer
plugin and i alway get 3 copies of the same file sent to the server.
> It is because the FileTransfer plugin removes the query string from the uri when it read
the file.
> The code line that's doing this is in CordovaResourceApi line 245
>    FileInputStream inputStream = new FileInputStream(uri.getPath());
> It's reading the file without the query string file:///mnt/sdcard/Android/data/appname/cache/modified.jpg

> In iOS i don't have this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message