Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share photos while sharing loyalty card #294

Open
TheLastProject opened this issue Jul 27, 2021 · 11 comments
Open

Share photos while sharing loyalty card #294

TheLastProject opened this issue Jul 27, 2021 · 11 comments
Labels
common: occasional Affects or can be seen by some users regularly or most users rarely severity: minor Impairs non-critical functionality or suitable workarounds exist state: help wanted I looked into this issue but couldn't solve it quickly type: enhancement New feature or request

Comments

@TheLastProject
Copy link
Member

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 TheLastProject added type: enhancement New feature or request state: help wanted I looked into this issue but couldn't solve it quickly labels Jul 27, 2021
@TheLastProject
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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?

@Kethen
Copy link
Contributor

Kethen commented Oct 27, 2021

do you plan to provide file hosting for encrypted images?

@TheLastProject
Copy link
Member Author

I might, not completely sure yet

@TheLastProject TheLastProject added common: occasional Affects or can be seen by some users regularly or most users rarely severity: minor Impairs non-critical functionality or suitable workarounds exist labels Feb 5, 2022
@Cj-Malone
Copy link

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.

@TheLastProject
Copy link
Member Author

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.

@Cj-Malone
Copy link

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.

@TheLastProject
Copy link
Member Author

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.

@Cj-Malone
Copy link

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.

@TheLastProject
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common: occasional Affects or can be seen by some users regularly or most users rarely severity: minor Impairs non-critical functionality or suitable workarounds exist state: help wanted I looked into this issue but couldn't solve it quickly type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants