Restriction to upload photo

Hi there!
In my app users have to upload photos of the receipt they obtain in retail. I restrict (on purpose) uploading existing photos allowing to make a photo instantly and then app receives a record (camera only option).
But if I open the same app on the desktop I have no chance to restrict uploading files.
Any idea how to set up restrictions on desktops?
Thanks!

You would need to find the Experimental Code column code in this community to extract the device information.

Then you would have a visibility condition on the upload component (ie show if device text includes iOS or Android).

I put this in my app…. Then I took it out again (I was an early adopter on XC things). I will likely bring it in again.

To handle computer users for some use cases (such as taking a photo of a covid test for remote diagnosis), the camera is best, but the upload on desktop users gives us a risk that the customer might cheat. We’ve made our own code in an AWS page to activate the camera (with permission), take a photo, then use the api to bring the result from AWS S3 back into the app (5-10 seconds).

1 Like

Thank you! It’s a bit complicated job for me. :wink: Maybe it is possible to restrict opening app on the desktop at all?

Sadly not - Glide is a web app and it’s just a web page.

1 Like

Dear Mark.
May I kindly ask you to help with this issue? It will help me a lot to avoid fraud in my app.
I have no idea how I can extract device type.
MFG
Oleg

This thread discusses extracting information from the user agent to determine the type of device being used.

But keep in mind that it’s easy to fake the user agent. Most browsers even provide the tools to preview websites as different devices by allowing you to change the user agent.

So, if fraud is a major concern, then restricting device usage based on the user agent is not going to be a secure method. At most the user agent just provides general info to the developer and if programmed accordingly, allows for websites to display differently based on info from the user agent. It can easily be changed and didn’t be relied upon for securely identifying users and their devices.

4 Likes