How to hide image picker in non-editing mode?

I am building a simple picture file that has functions equivalent to the camera and photo storage / presentation functions of iOS and Android. The intent is to:

  1. Learn how to build an app where access is limited by password so that data for different users is separated and access controlled.

  2. Learn how to build an app that handles records which can be added, deleted and modified by the user, and

  3. Build a very simple app that will allow me to cut down on the number of cards I need to have in my wallet. My son shamed me when he saw my thick wallet with all of these infrequently used cards that serve just as pretty images. This of course excludes all of the cards with chips in them – but that is what Apple Pay is for. I have a new case (from https://www.casebus.com/) for my iPhone that can hold two physical credit cards and some cash.


    (Forget about wireless charging with this case. :frowning:. ) Everything else will have to travel on the phone as images. I looked around and couldn’t find an app that just implements these very simple activities – sure there were lots that did a lot more, but I don’t want that.

So, Glide to the rescue. In the true spirit of Glide, I will just build it myself.

I have done some of the early stuff and you can see what I have at https://cardholder.glideapp.io/

As I said, this is intended to be very simple. Right now I have left it open, but the next thing I will be doing is to turn on the access control.

But there are already a couple of questions I’ve run across:

  1. I am using the image picker to gather the photos of the card’s front and back. This works fine on my iPhone, but when I try it on my Mac Chrome browser, all I get is a finder that pops up and lets me select a file. Since I find that sometimes it is best to populate and manage these cards from my laptop, and I find that people expect to have the same functionality on a laptop and a smartphone, are there any plans to implement an interface to the laptop’s camera and perhaps a popular image cataloger on the laptop such as Apple Photos for Macs or MSPhotos for Windows (note: I am not a Windows user, so I don’t know the most common program used for cataloging and viewing photos on a Windows machine).

  2. Here is the “add new card” screen:

  3. After I take a picture of the front of the card, here is what I see in the normal display of the card (i.e., not the editing interface):


    The question I have is why is the image picker item visible, and is there currently a way to get rid of it. I looked for at the standard options visibility interface and didn’t see any way to make the image picker not appear in standard presentation mode.

  4. Of course I’d love to stay in Glide and do a little editing on the photo of the card (such as rotate and crop it), but I’m not sure how to do those functions totally in Glide or even reaching out to a helper app.

Even with all of these little nitpicks, I must say I am impressed at how easy it has been to build such an app once I learned several new skills as I mentioned at the top of this message.

Thanks,

– Harry

If you don’t want the image picker component on that screen, why don’t you just remove the component instead of trying to find ways to hide it?

Also, can your expand on you plans for access control? I would not recommend building your own password access control outside of what glide already provides. There is next to no security I trying to role your own security.

2 Likes

Oh, now I understand: I thought I needed to have an image picker in order to introduce an image on a new item, but I see, for example, if you have an image in the template for an item, going into edit mode adds an image picker for that image just as if you have a text field you will see a blank line for you to type in a value in edit mode-- this makes perfect sense. Thanks for the correction in how I was thinking about what I needed to do.

Now, any ideas about how to do some very simple trimming and orienting changes to images shot from a camera?

You could probably explore what Cloudinary offers as far as image manipulation, but I can’t think of a way to do it only in glide. If it were me, I’d probably just end up taking the picture, manipulate and crop it through my phone’s photo software, then upload that cropped image.

1 Like

I understand what you mean by just using the separate tools available to you on your iPhone. And that is what I do most of the time.

But, I am thinking about my wife as a user. She would much prefer a complete solution for simple cases. I perhaps was misleading when I said a Glide-based solution. What I really meant was a solution that does not require (but still allows) the user to have an external solution for solving simple cases.

Your recommendation of Cloudinary looks promising. I’m going to look in the community posts about how people have used Cloudinary – examples of Glide apps that use an outboard engine, such as Cloudinary, that can be fed a file in Glide, perform some operations on the file, and then return a result which can be saved as a file in Glide storage. I have done something like this in my Walking Tour app is using calling Google Maps through a URL to provide navigation from where you are to one of the tour locations. From the user’s perspective, the integration just eliminates some easy but annoying inputs from my app to Google Maps.

2 Likes

@Jeff_Hager After struggling with Cloudinary for 3 days, I decided to take your advice and give up trying to do this by automation. I used Photoshop to cleanup the photos of cards (rotation, background removal, trimming, resolution reduction) and store this sequence of Photoshop commands as a Photoshop action (macro).

The problem is that Cloudinary is really aimed at developers who are using API-based programming development environments, Yes, they have URL-based ways of doing many of their operations, but not all of them. I asked the following question:

Harry asks: Let’s step back a bit. Is there a way to access all of the capabilities of Cloudinary via HTTP URL’s. I have developed my app using Glide and the best [easiest] way for me to use services from other providers is through a URL. So, I can import an image into Glide and then build URLs referencing that image so that I could use Cloudinary to do image manipulation of the sorts that I have described. But, I need a pure URL interface. Thanks.

and received two responses from two different people:

From Akshay: For AI background removal [one of the steps I need to get rid of edges of a scan of a card] you need to use our SDK. What other features do you want to use? I can let you know if they can be used via URL.

Not very encouraging. But then this morning:

From Yakir: Apply Adobe Photoshop Lightroom editing, along with Cloudinary’s manipulations such as content-aware cropping and automatic optimization, via a simple API [I think he meant to say URL] request. Documentation: Adobe Photoshop Lightroom Add-on | Cloudinary

This is getting closer to what I think I need – but I wish it was Photoshop, not just Lightroom because as I said above, I have figured out how to do this in s repeatable set of Photoshop commands. If Cloudinary could do this, I would be happy. If Glide could do this, I’d be even happier :heavy_heart_exclamation:

My primary desire to do this is for people who haven’t mastered a photo editor (and probably don’t want to) but still want to have their cards look good.

Yeah, cloudinary just isn’t something I’ve explored yet. Most people in the forum that use cloudinary use a fetch command in the url to import the image into cloudinary, then through JSON option parameters, they specify what manipulations they want done to the image. This is all part of the url, and essentially is an API call, but instead of it returning an object full of values or a single response value, it results in the manipulated image. So the manipulated image is ultimately coming from cloudinary’s data store. I know you can do a lot to an image, but I’m not familiar with all of the options.

There is also some very basic ability to call API’s in staging, but it hasn’t been released yet and I’m not sure how it would work with images.

I don’t think I have a good answer for this one.

2 Likes

Jeff,

In answer to your question:

Also, can [you] expand on [your] plans for access control? I would not recommend building your own password access control outside of what glide already provides. There is next to no security I trying to role your own security.

Right! Totally agree with the futility of rolling your own in the security world…

Yesterday I started looking at this issue as I was interested in showing my app off to people, but not wanting to reveal my credit card numbers or social security number… I realized I had to put some security into my app. It is very easy to dream up simple apps that require sophisticated security.

I’m getting the sense from my initial exploration that, for some reason, User Profiles are not a secure way of access control. I’m not sure why, since thinking about this with just a small amount of paranoia, there is one point where the authenticity of a user being associated with a password is established. Granted, once the pin is returned, the proof of authenticity has been established. But the fact that each session is not authenticated may be suspicious to many.

I suspect there is something far worse than I am seeing. Two questions:

  1. What are the main reasons why User Profiles aren’t good enough? A couple of gotcha’s will due.

  2. I’ve asked this question before, but I don’t remember the answer: Is there anything similar to username/password authentication available in Glide? I don’t see it with my quick/lossy perusal of the documentation. It looks like there are (too) many different strategies for keeping multiple user’s data out of each other’s hair – and that concerns me. With so many mechanisms, I think confusion will occur among both the Glide developers group as well as certainly the App developers group who use Glide to build their smartphone apps.

  3. What security mechanisms already in Glide are better than User Profiles? I suspect that anything that is truly secure is not available until one of the paid levels of service.

  4. [Side note: I wish there was some limited usage volume of all features for developer testing so that those of us who are not generating any income from our apps (yet) can still learn in the best way possible: project-based learning by building something and learning by mistakes and successes. I’m sure this has been said before].

Enough for now.

Regards,

– Harry

  1. User Profiles alone do not protect data and it can still be downloaded to a device behind the scenes. The main advantage to using user profiles is the automatic creation of the row in the sheet when a user signs in for the first time and the readily available access to any data in that user profile throughout the app without the need for relations and lookups all over the place.
    -Row Owner’s prevents unauthorized data from being sent to a device in the first place.

  2. No, there is no user/password authentication available. Email with pin is the most secure because it create an authorization cookie on the device. That’s why you can open the app and still be logged in. You can disable the authorization cookie if you choose, so a user will be signed out every time they close the app and will have to re-authenticate with a pin. There is a “Password” option, but it’s a “1 password for all” solution with no individual user separation.

  3. Row Owners, Row Owners, Row Owners

I would recommemend spending some quality time reading through this material.

(As a side note, I would be careful with images that contain financial information. Those images might be hard to access, but I’m pretty sure the urls are still public, no matter what your security settings are.
Stuff like that I would probably only store in a password manager like 1password because their main purpose is extremely hard to crack encoding of data.)

2 Likes

@Jeff_Hager

Hmmm. I’m disappointed to discover that Glide has many point solution security mechanisms, yet has no clear security model for data that can serve the increasingly common need to store and communicate sensitive data. I am fearful that we might be unleashing a system on unsophisticated (as they should be) masses of developers (such as the target audience of Glide) who won’t be cautious or have the expertise to understand the implications of less than state-of-the-art security underpinnings.

Other disciplines (Health Care providers who safely prescribe drugs that can be taken by medically unsophisticated patients, Financial Service organizations who safely sell Mutual Funds to unsophisticated investors, etc.) take this into consideration all of the time. They provide sophisticated, safe versions of their products that in previous times might have required highly skilled professionals to prescribe or sell safely.

Flame_On:

Granted the average developer doesn’t have the skill to implement a crypto secure system, but there are developers who do understand how to do this and can design simple and effective security mechanisms usable by unsophisticated app developers. I think Glide should be planning to devote some development resources to solve this problem if they want to have their development system be an excellent place to develop all smartphone apps, not having to say things like, “Oh, be careful of the type of data you are planning on storing – the security mechanisms are not strong enough to protect data such as SSIDs, Financial information, Medical information, Intellectual property, etc.” With online systems spreading wide and far into all areas of personal and commercial life, not having good security in the underpinnings of a modern system is a mistake.

Flame_off;

I’m sorry to be so preachy, but I have been primarily attracted to Glide by the stated goal of targeting “the billions of app builders of the future”. When I see things in Glide that diverge from that goal by short-changing essential capabilities, I question whether Glide will meet its stated goal. This may be happening due to limited resources and success expectations with too short time spans. A published plan of intended directions (i.e., providing some details of Glide’s vision of what it will take to become the development platform for a billion developers in 10 years) would help to reassure me that Glide is heading in the right direction.

Finally, please don’t get me wrong: I think Glide is one of the most encouraging improvements in application development systems. It is in the same class as spreadsheets as a model for computing that has allowed orders of magnitude more people to make effective use of their computers. Glide can be the spreadsheet of smartphone apps with just a little more attention to some fundamental ideas such as security.

– Harry

Cc: @davd

1 Like