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

Replace QR Code API #18

Closed
jessienab opened this issue Apr 26, 2023 · 3 comments
Closed

Replace QR Code API #18

jessienab opened this issue Apr 26, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@jessienab
Copy link

jessienab commented Apr 26, 2023

To reduce issues relating to user privacy, it would be ideal to add support or implement the use of a self-hosted/local piece of code, to generate QR codes of image URLs.

PHPQRCode seems to be a viable PHP based project for this kind of work, however I imagine it stores the image locally. I guess a solution to that would be exporting the generated image as a set of base64 text the browser would present? Can the 3DS Browser even accept that kind of data?

There are some other QR generating alternatives, but I haven't found one (in a quick search) that doesn't require payment or an account on someone's end.

Thank you for the code and service!

@corbindavenport
Copy link
Owner

corbindavenport commented Apr 26, 2023

I agree it would be a good idea to locally generate the QR codes, if only to avoid the QR codes breaking in the future if Google suddenly starts enforcing SSL on those images (or breaks them in some other way). I think that endpoint is already deprecated.

The implementation might be tricky, though. I assume Data URIs would work for the 3DS and Wii U, but I generally want ImageShare to work on other old browsers, and embedding URI images wasn't widely supported until 2010-ish: https://caniuse.com/datauri

That library looks like it generates a PNG file and then just embeds it normally, which should work fine, but there might need to be some additional code in ImageShare for cleaning up those files afterwards. I'll have to look into that!

@corbindavenport corbindavenport changed the title [Suggestion] Replacing Google QR Code API with self-hosted/privacy respecting code Replace Google QR Code API Apr 26, 2023
@corbindavenport corbindavenport added the enhancement New feature or request label Apr 26, 2023
@corbindavenport
Copy link
Owner

ImageShare now uses the goQR.me API for rendering QR codes, since the Google API appears to be shut down (it has been marked as deprecated for a while) and goQR supports both HTTP and HTTPS connections. Ideally ImageShare still needs to move to a local solution for QR code generation.

@corbindavenport corbindavenport changed the title Replace Google QR Code API Replace QR Code API Jan 18, 2024
@corbindavenport
Copy link
Owner

Merged this into #28.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants