Android icon indicating copy to clipboard operation
Android copied to clipboard

Share photos while sharing loyalty card

Open TheLastProject opened this issue 4 years ago • 11 comments

Need to figure out how to best do this in a privacy-friendly way. We don't want to upload the user photos anywhere.

TheLastProject avatar Jul 27 '21 17:07 TheLastProject

Actually, we could upload the user photos somewhere and put a decryption key in the share URL? Hmm... This can possibly become expensive though, so we need to find some way to keep the costs down. I don't want Catima to end up becoming an expensive project for me.

TheLastProject avatar Jul 27 '21 20:07 TheLastProject

Maybe we can just use transfer.sh, but we'd still need a good way to encrypt/decrypt the pictures then. Preferably something with little dependencies and that can also easily be done in-browser to keep compatibility with non-Catima users.

TheLastProject avatar Jul 27 '21 20:07 TheLastProject

Okay, so, I guess my plan is currently as follows:

When sharing:

  1. AES-encrypt all images with a random password
  2. Upload using transfer.sh
  3. Add the URLs of the files and the password to the ImportURI

When receiving

  1. Download all the files from the supplied URLs and decrypt using the password in the URL

On the browser side:

  1. Use something like CryptoJS?

TheLastProject avatar Aug 15 '21 17:08 TheLastProject

do you plan to provide file hosting for encrypted images?

Kethen avatar Oct 27 '21 05:10 Kethen

I might, not completely sure yet

TheLastProject avatar Oct 27 '21 06:10 TheLastProject

I think you're over thinking this one, from what I've seen most loyalty cards are shared by a screenshot (or worse a photo of a phone screen). Simply generate a png and let people share it with there messaging app.

You can already share via the website.

Cj-Malone avatar Aug 17 '22 22:08 Cj-Malone

Simply generate a png and let people share it with there messaging app.

How exactly would Catima import that? How would that scale to the current 3 pictures an user can set per card (icon, front and back)?

The point of this issue is to ensure that when you share a loyalty card for someone else to import they can import the images too.

TheLastProject avatar Aug 18 '22 06:08 TheLastProject

Oh, I read this as sharing a loyalty card as a image, not sharing the images embedded.

No real opinion on sharing the embedded images, I've never used them. If they are set sizes you could probably crop the shared image.

On sharing a loyalty card as an image, you can add the extra details like name and expiration date as exif metadata.

Cj-Malone avatar Aug 18 '22 08:08 Cj-Malone

If they are set sizes you could probably crop the shared image.

The problem is that currently everything is stored in the URL and images are just a lot of data and won't fit within the URL limit (and even if it does for small images, it'll look awful).

On sharing a loyalty card as an image, you can add the extra details like name and expiration date as exif metadata.

The idea of that is nice. However, privacy measures in popular chat apps like WhatsApp and Signal mean that metadata often gets stripped. So the current URL method is much better for that.

TheLastProject avatar Aug 18 '22 16:08 TheLastProject

The problem is that currently everything is stored in the URL and images are just a lot of data and won't fit within the URL limit (and even if it does for small images, it'll look awful).

IMO, if sharing an image it shouldn't be hosted. Just let the user message it other people, no web involved.

The idea of that is nice. However, privacy measures in popular chat apps like WhatsApp and Signal mean that metadata often gets stripped. So the current URL method is much better for that.

Yeah, you'll have to check what they do. I doubt they strip all exif tags, but do they strip all except xyz, or do they strip xyz and leave all others?

I think the share via url and share via image should both exist, one doesn't replace the other.

Cj-Malone avatar Aug 18 '22 17:08 Cj-Malone

IMO, if sharing an image it shouldn't be hosted. Just let the user message it other people, no web involved.

Again, we're talking about sharing up to 3 images per card in a way that can be imported together with the card by just tapping on something in Android (like a link). I see no way sharing an image into a chat program lets you import like that. Have you ever use Catima's card sharing feature? I feel you may be missing some context of how the feature currently works and what Android platform limitations with "intents" there are to deal with.

I think the share via url and share via image should both exist, one doesn't replace the other.

The current method sends a link that can with a single click be imported into Catima or (if Catima is not available) opens in a browser and renders the card with JavaScript without ever sending any data to the server. Sharing an image instead has several issues I've already mentioned in #254. Sharing an image with the URL as a comment MIGHT be possible, but I've seen that for example WhatsApp when sharing an APK + URL from F-Droid will not display the URL so that would most likely lead to compatibility issues and thus also create an experience inferior to the current experience. No matter what, it is still unrelated to the issue this is being discussed in.

TheLastProject avatar Aug 18 '22 18:08 TheLastProject