cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon MacDonald (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-2172) Uploading two images from the photo library does not work
Date Tue, 08 Jan 2013 20:08:13 GMT

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

Simon MacDonald commented on CB-2172:
-------------------------------------

Show some code. When you say you are calling them sequentially does that mean you are waiting
for the success callback of the first FileTransfer to be called before going ahead with the
second transfer?
                
> Uploading two images from the photo library does not work
> ---------------------------------------------------------
>
>                 Key: CB-2172
>                 URL: https://issues.apache.org/jira/browse/CB-2172
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.2.0
>         Environment: Cordova 2.2, Android 2.3.4
>            Reporter: Thomas Dinger
>            Assignee: Filip Maj
>
> My HTML page has two separate elements for selecting a picture from the photo library,
and a single button for uploading the photos that were selected. Unfortunately, the result
is that the same picture is being uploaded twice instead of two different pictures each being
uploaded once. The picture being uploaded twice is always the last picture selected from the
photo library, regardless of which element was used to select it, or which order the javascript
calls are made.
> The JavaScript calls to FileTransfer.upload() are made sequentially when the "upload"
button is pressed. Each call passes the same ajax URL to handle the uploaded data, a different
local device URI of the image to be uploaded, and a different name for the uploaded file (in
options). Inspecting the requests received on the server, the file name is different for each
request, but the data in the request content (the binary picture data) is the same for each
request.
> It seems some component is hanging on to the last picture selected from the photo library
and using it for each upload.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message