microsoft / AzUrlShortener

An simple and easy Url Shortener
MIT License
509 stars 531 forks source link

Feature request (idea): Create QR Code for ShortUrl #175

Open fs366e2spm opened 3 years ago

fs366e2spm commented 3 years ago

Would love to have a QR code for the ShortUrl which can be shared / published. I did some first tests and implemented this in an Azure Function: https://github.com/heyAyushh/qrfn (Site: https://medium.com/microsoftazure/qrfn-6bba706fbbcb) and it works but it's in JavaScript. I guess it can be done like the other Azure Functions in C#? In best case an image is returned, not html code.

I found some other examples:

QRCode npm package description: https://www.npmjs.com/package/qrcode

┆Issue is synchronized with this Trello card by Unito

fs366e2spm commented 3 years ago

Found this manual: http://davidgiard.com/2018/09/19/InstallingNodePackagesForAzureFunctions.aspx https://functionappname.scm.azurewebsites.net still works to access the Debug console. Seems to be the way how to install the qrcod npm module.

jenzushsu commented 3 years ago

Hi @fs366e2spm , are you using VS Code to develop and deploy the function app which I have shared? Locally, you will need to install the npm package in your project folder. Once you deployed to Azure, package.json will take care of that as the Azure Function core tool will take care of it. Hope it helps.

MichaelHumplEnBW commented 3 years ago

Hi, instead of generating the QR-code my idea is to redirect to an open qr-code generater api-URL. A example for this is inside RP #190 .
URL to Test: [Azure Funktion Base-URL]/QR/{shortURL}

FBoucher commented 3 years ago

@MichaelHumplEnBW interesting code in PR #190 The Function name is wrong however. To be consistent it shouldn't be Redirect... maybe QRCode or QRCreate