Hi everyone,
I'm developing an application using OutSystems 11 Reactive Web, which will be published and used as a PWA on mobile devices.
I have a requirement where users should be able to capture documents directly using their mobile device's camera instead of selecting existing images from the gallery.
I would like to understand the best way to implement this functionality in OutSystems 11 Reactive.
My requirements are:
1. Open the mobile device's camera when the user clicks a Capture Document button.
2. Capture documents using the rear camera.
3. Display a preview of the captured image.
4. Allow users to retake the image if required.
5. Convert or retrieve the captured image as Binary Data so that I can upload it to my backend/CRM API.
6. Ensure the functionality works properly on both Android and iOS devices when accessing the application as a PWA.
My questions:
- Can this be achieved using the standard OutSystems Upload widget, or do I need to use a Camera Plugin?
- Are there any recommended plugins or approaches for implementing camera functionality in Reactive PWAs?
- Are there any limitations or compatibility issues with camera access in OutSystems 11 PWA applications?
I would appreciate it if someone could share an implementation approach or a working example.
Thanks in advance!
You can implement this in a Reactive app running as a PWA, but you should not rely only on the standard Upload widget. For a good UX (open camera directly, rear camera, preview, retake, binary upload) you’ll typically combine:
getUserMedia
Below is how to structure it in OutSystems 11 Reactive.
The standard Upload widget in Reactive is basically a <input type="file">. On mobile browsers you can hint the camera using accept, but you can’t fully control:
<input type="file">
accept
Also, browser behavior is inconsistent across devices. So relying only on Upload will not satisfy all your requirements in a predictable way.
Use Upload for “select from device” fallback, but for full camera control you should use a plugin / JS approach.
PWA Camera & Microphone Forge component This is specifically designed for PWAs and runs fully in the browser (HTML5 APIs). It allows capturing images from camera in Reactive and is suited to your use case. Allowing user to capture image and upload image in reactive web application
Camera.Reactive Another Forge option used in Reactive apps that leverages browser camera APIs. How to open camera while uploading or changing profile picture in reactive web app?
These components typically provide:
You also have built‑in Camera plugin support for PWA in OutSystems 11, as documented in the official Camera Plugin docs. Is camera functionality possible in Progressive Web Apps?
Below is a typical pattern that meets your 6 requirements.
In your screen:
CapturedImageBinary
ShowPreview
IsRetakeMode
ShowPreview = True
Optionally:
Call the plugin’s “Take Picture” / “Open Camera” client action (or PWA Camera block action):
CameraFacing = Back
Depending on the plugin:
BinaryDataFromText()
BinaryToBase64
TextToBinary
ShowPreview = False
OutSystems Reactive PWAs rely on browser capabilities. The main limitations/considerations:
Browser dependency
Camera plugins vs native app
Security / permissions
Document-style capture
Can this be achieved using the standard Upload widget? Not reliably for your full requirement set. You can hint the camera via Upload, but you don’t get guaranteed rear camera, preview & retake UX, and behavior is browser-specific. Use Upload as fallback only.
Do I need a Camera Plugin? Yes, for a controlled experience you should use a camera-oriented Forge component or a JS-based solution (like PWA Camera & Microphone, Camera.Reactive, or a custom getUserMedia integration). Allowing user to capture image and upload image in reactive web application How to open camera while uploading or changing profile picture in reactive web app?
Recommended plugins/approaches for Reactive PWAs?
Any limitations / compatibility issues?
If you share which Forge component you’re inclined to use (e.g., PWA Camera & Microphone vs Camera.Reactive), I can outline a more concrete step-by-step flow for that specific component (variables, actions, and typical screen structure).
Hi,
You don’t need the Camera Plugin for this. It only works in native mobile builds, not in a PWA. The standard Upload widget can do it with a small trick.
I’ve attached a sample OML with a working screen (CaptureDocument). Here’s what it does:
Tested on Android PWA and it works fine.
You can try in your phone with this link :- https://personal-eewexkfl.outsystemscloud.com/TestOne/CaptureDocument
Hope this helps!
Thanks
Gourav Shrivastava