AzUrlShortener
AzUrlShortener copied to clipboard
Feature request (idea): Create QR Code for ShortUrl
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:
- Site: https://blog.bitscry.com/2018/03/15/returning-image-files-from-an-azure-function/ GitHub/Code: https://github.com/mattosaurus/QRCodeFunction/tree/master/QRCodeFunction.
- Site: https://medium.com/@jenzushsu/generate-qr-code-programmatically-using-azure-functions-power-apps-d0e545c0a5d3
Here I don't know how to upload or provide the required QRCoder module. Guess it needs to be uploaded to the storage account? The module is installed locally:
npm install --save qrcode
QRCode npm package description: https://www.npmjs.com/package/qrcode
┆Issue is synchronized with this Trello card by Unito
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.
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.
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}
@MichaelHumplEnBW interesting code in PR #190 The Function name is wrong however. To be consistent it shouldn't be Redirect... maybe QRCode or QRCreate