cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dinger (JIRA)" <>
Subject [jira] [Created] (CB-2172) Uploading two images from the photo library does not work
Date Tue, 08 Jan 2013 20:04:13 GMT
Thomas Dinger created CB-2172:

             Summary: Uploading two images from the photo library does not work
                 Key: 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:

View raw message