Uploading an image directly from the camera in the Salesforce App on Android does not fire onchange event on second attempt
Trailblazer Community

Uploading an image directly from the camera in the Salesforce App on Android does not fire onchange event on second attempt

Mobile , Web Container , Spring 18 , Winter 18 , Lightning

Last updated 2018-03-23 ·Reference W-4677168 ·Reported By 1 users

Fixed in version Salesforce1 v15.2 (Android)

Summary
When using the Salesforce mobile app (for Android) to upload a photo using the camera directly (not from the gallery) with simple lightning component, the onChange events are fired the first time. However, when you try to upload again directly from the camera to try and replace the image onchange is not fired.

Repro
Mark up TestFileUpload:

<aura:component implements="force:hasRecordId,force:appHostable">
<aura:attribute name="myRecordId" type="String" description="Record to which the files should be attached" />
<lightning:fileUpload label="Attach receipt"
multiple="true"
accept=".pdf, .jpg"
recordId="0010N000047FTwV"
onuploadfinished="{!c.handleUploadFinished}" />
</aura:component>

Controller TestFileUpload:

({
handleUploadFinished: function (cmp, event) {

alert('OnChange Fired');

}
})

1) Create a lightning component using above markup and controller.js code.

2) Create a new Lightning Tab and assign the component from Step 1 to the Tab.

3) In Setup > Salesforce Navigation , add the newly created Lightning Tab to the Selected column.

4) Log into the Org on an Android device using the Salesforce app for Android.

5) Navigate to the Lightning Tab you created in Step 2.

6) Tap on the "Upload Files" button to upload a file.

7) From the Android menu select Camera as source

8) Take a picture and accepept it for upload

9) Observe that the onchange event is fired and the alert is shown

10) Perform steps 6 to 8 again

11) observe that no the onchange event is NOT fired and the alert is not shown.

Workaround
No workaround currently.

Reported By (1)

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.