Hello,
I have the need to automatically submit an uploaded image (using Phonegap Build/Cordova) in a data bound dialog once the image has been successfully uploaded.
Currently a user must do the following to capture a photo:
- Click button 1 to navigate to a panel card with an embedded dialog
- Click button 2 to bring up device's camera
- Click button 3 to accept the captured photo
- Click button 4 to submit the record
Obviously button clicks 1-3 are a must, but I'd love to do away with #4...
It would seem that the After upload event tied to the Image Upload Javascript Action would be a nice way to perform a simple {dialog.object}.submit(); but I'm finding that both the Server & Client-side events associated with Image Upload will not fire if the Application Type is set to 'Mobile'.
So my next option seems to be the dialog-level client-side events: onStateChange or onDataStateChange. It seems like I should be able to use javascript to test that both the dialog is dirty and that there is indeed a photo that has been uploaded to the server, but alas, the closest I've been able to get to my goal using this approach is one valid photo submission followed by about 3 db inserts per second until I kill the app. Yikes!
So am I trying to achieve the impossible here, or just barking up the wrong tree so far?
Thanks in advance!
Justin Taylor
I have the need to automatically submit an uploaded image (using Phonegap Build/Cordova) in a data bound dialog once the image has been successfully uploaded.
Currently a user must do the following to capture a photo:
- Click button 1 to navigate to a panel card with an embedded dialog
- Click button 2 to bring up device's camera
- Click button 3 to accept the captured photo
- Click button 4 to submit the record
Obviously button clicks 1-3 are a must, but I'd love to do away with #4...
It would seem that the After upload event tied to the Image Upload Javascript Action would be a nice way to perform a simple {dialog.object}.submit(); but I'm finding that both the Server & Client-side events associated with Image Upload will not fire if the Application Type is set to 'Mobile'.
So my next option seems to be the dialog-level client-side events: onStateChange or onDataStateChange. It seems like I should be able to use javascript to test that both the dialog is dirty and that there is indeed a photo that has been uploaded to the server, but alas, the closest I've been able to get to my goal using this approach is one valid photo submission followed by about 3 db inserts per second until I kill the app. Yikes!
So am I trying to achieve the impossible here, or just barking up the wrong tree so far?
Thanks in advance!
Justin Taylor
Comment