# Restricting FileUpload to Only Use Camera Photos (No Gallery Selection) – Perspective

**URL:** <https://forum.inductiveautomation.com/t/restricting-fileupload-to-only-use-camera-photos-no-gallery-selection-perspective/108923>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 24, 2025, 7:08pm UTC](https://forum.inductiveautomation.com/t/restricting-fileupload-to-only-use-camera-photos-no-gallery-selection-perspective/108923 "2025-07-24T19:08:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![matheus.dantas098](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matheus.dantas098](https://forum.inductiveautomation.com/u/matheus.dantas098)\
**Post date:** [July 24, 2025, 7:08pm UTC](https://forum.inductiveautomation.com/t/restricting-fileupload-to-only-use-camera-photos-no-gallery-selection-perspective/108923/1 "2025-07-24T19:08:23Z")

</div>

I'm developing a project in **Ignition Perspective** that uses the **FileUpload** component. At certain points in the process, the user is required to **capture a real-time photo** to verify that specific conditions have been met—such as a clean environment or a properly completed task. These photos serve as **visual evidence**.

For this reason, I would like to **restrict the upload functionality** so that **only images taken directly with the camera** can be submitted, preventing the selection of files from the device’s gallery or file system. The goal is to ensure greater **reliability and authenticity** in collecting this evidence.

Is there a way to configure the FileUpload component (or use an alternative) to allow only the use of the camera? Any workaround or browser-specific solution would also be appreciated.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 24, 2025, 7:13pm UTC](https://forum.inductiveautomation.com/t/restricting-fileupload-to-only-use-camera-photos-no-gallery-selection-perspective/108923/2 "2025-07-24T19:13:10Z")

</div>

This isn't possible in any reliable way.  
As a webview, ultimately the best you could do is provide a hint to the mobile OS using the [capture](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/capture) attribute. This isn't currently exposed on the file upload component, so to do this in the short term would require a completely custom component or some frontend hacking (talk to @bmusson, maybe). But even if you were able to provide that value, it's still nothing more than a 'hint' to the user agent and not a guarantee that you're getting true live camera input.

---

<div class="post-metadata">

**Author:** ![rickard.eriksson](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@rickard.eriksson](https://forum.inductiveautomation.com/u/rickard.eriksson)\
**Post date:** [June 23, 2026, 6:41am UTC](https://forum.inductiveautomation.com/t/restricting-fileupload-to-only-use-camera-photos-no-gallery-selection-perspective/108923/3 "2026-06-23T06:41:08Z")

</div>

I kind of solved this by looking at the file name. iOS seems to always name the new photo to "image.jpg"

---

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [June 23, 2026, 2:48pm UTC](https://forum.inductiveautomation.com/t/restricting-fileupload-to-only-use-camera-photos-no-gallery-selection-perspective/108923/4 "2026-06-23T14:48:12Z")

</div>

Photos also have metadata associated with them. Unless the user is using an app to scrub it you could just check the EXIF for the timestamp and reject it if its not taken within X timeframe.

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [June 23, 2026, 9:47pm UTC](https://forum.inductiveautomation.com/t/restricting-fileupload-to-only-use-camera-photos-no-gallery-selection-perspective/108923/5 "2026-06-23T21:47:32Z")

</div>

> [@paul-griffith](#):
>
> (talk to @bmusson, maybe)

You can now do this using Embr Periscope's Client Resource feature:

> [@Musson Industrial's Embr-Periscope Module](https://forum.inductiveautomation.com/t/musson-industrials-embr-periscope-module/99047/89):
>
> Release Notice [Embr v8.1 - 2026.5.28](https://github.com/mussonindustrial/embr/releases/tag/releases%2F8.1%2F2026.5.28)[Embr v8.3 - 2026.5.28](https://github.com/mussonindustrial/embr/releases/tag/releases%2F8.3%2F2026.5.28)Client Resources + React Component Client Resources are files compiled to JavaScript that are loaded by the Perspective client on launch. There are currently two supported types: TypeScript (supports JavaScript, TypeScript, JSX, and TSX) CSS Modules All Client Resources loaded and run on page load/refresh, serving as a direct, robust alternative to Markdown Injection. They can also provide React components, which can be used via a …

In a Client Resource module, you can write a custom input component that has a [capture](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/capture) attribute.

You'll need to manually handle routing the `onChange` event to the Gateway.  
I'd recommend either:

1. Sending the file to a WebDev endpoint.
2. Explore using the client-side `FileUploadUtility` + a custom Page event listener subscribed to [FileUploadModelDelegate.FileUploadedToPageEvent's](https://sdk.inductiveautomation.com/javadoc/ignition81/8.1.33/com/inductiveautomation/perspective/gateway/components/FileUploadModelDelegate.FileUploadedToPageEvent.html).
3. Possibly sending the bytes to a message handler if the file size isn't too large.

---

<div class="post-metadata">

**Author:** ![Tokyo\_mht](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Tokyo\_mht](https://forum.inductiveautomation.com/u/Tokyo_mht)\
**Post date:** [June 24, 2026, 8:10am UTC](https://forum.inductiveautomation.com/t/restricting-fileupload-to-only-use-camera-photos-no-gallery-selection-perspective/108923/6 "2026-06-24T08:10:30Z")

</div>

You can achieve this using WebDev module by writing HTML, CSS, and JavaScript to handle image functionality. The application can allow users to either download the image or store it in a database, depending on the requirement.
