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

QRCodeProvider - make GetUri public #20

Open
alex-jitbit opened this issue Oct 25, 2021 · 4 comments
Open

QRCodeProvider - make GetUri public #20

alex-jitbit opened this issue Oct 25, 2021 · 4 comments

Comments

@alex-jitbit
Copy link

alex-jitbit commented Oct 25, 2021

To prevent the extra hop of downloading QR-image from the provider and then transferring it to the the client again - allow us to insert the URL into client's HTML directly.

Also your code for the default provider is the not most efficeint one (uses webclient - no connection caching, no async call etc, bu that's another issue)

@RobThree
Copy link
Owner

To prevent the extra hop of downloading QR-image from the provider and then transferring it to the the client again - allow us to insert the URL into client's HTML directly.

I'm not quite sure I understand. Could you give an example?
The GetUri method appears 3 times in the code, and each time it's specific to that specific provider.

Also your code for the default provider is the not most efficeint one (uses webclient - no connection caching, no async call etc, bu that's another issue)

Yeah, I haven't come around to making it async and use a propery HttpClient / DI.

@alex-jitbit
Copy link
Author

I'm not quite sure I understand. Could you give an example?

Sorry I wasn't clear.

The QR code providers that rely on 3rd party services first download the code from that service (e.g. image-charts) and then I can insert the resulting data-uri into my app's HTML.

How about allowing us to inserting the 3rd party image-generating API URL into html directly, so it's the client's browser that downloads the image, not my backend server?

<img src='@tfa.Something.GetUri()>

which would render

<img src='https://image-charts.com/chart?cht=qr&.....'>

@alex-jitbit
Copy link
Author

BTW treat this as a low priority feature request and feel free to close ;)

@RobThree
Copy link
Owner

BTW treat this as a low priority feature request and feel free to close ;)

No, it's about time I give this project a bit of love again. I'll see what I can do; no promises (yet) though 😉

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

No branches or pull requests

2 participants